MS 2753 then FR 394 at Madrid
Cairo → Madrid → Ibiza
Timetable, Madrid time
12:25MS 2753 from Cairo at the gate
06:30FR 394 to Ibiza leaves the gate
18 h 05 apart on the timetable, overnight
FR 394 leaves 18 h 05 after MS 2753 arrives on the timetable: more than half a day, so not a connection we count.