IB 706 then FR 997 at Madrid
Rome → Madrid → Wroclaw
Timetable, Madrid time
12:55IB 706 from Rome at the gate
05:45FR 997 to Wroclaw leaves the gate
16 h 50 apart on the timetable, overnight
FR 997 leaves 16 h 50 after IB 706 arrives on the timetable: more than half a day, so not a connection we count.