SM 3111 then I2 1697 at Madrid
Cairo → Madrid → Ibiza
Timetable, Madrid time
12:00SM 3111 from Cairo at the gate
10:20I2 1697 to Ibiza leaves the gatealso IB 1697, VY 5544, AA 8676
22 h 20 apart on the timetable, overnight
I2 1697 leaves 22 h 20 after SM 3111 arrives on the timetable: more than half a day, so not a connection we count.