NE 8017 then FR 2766 at Madrid
Cairo → Madrid → Prague
Timetable, Madrid time
14:05NE 8017 from Cairo at the gate
10:05FR 2766 to Prague leaves the gate
20 h apart on the timetable, overnight
FR 2766 leaves 20 h after NE 8017 arrives on the timetable: more than half a day, so not a connection we count.