FR 998 then EW 3181 at Madrid
Wroclaw → Madrid → Prague
Timetable, Madrid time
21:20FR 998 from Wroclaw at the gate
13:55EW 3181 to Prague leaves the gate
16 h 35 apart on the timetable, overnight
EW 3181 leaves 16 h 35 after FR 998 arrives on the timetable: more than half a day, so not a connection we count.