FR 9601 then UX 9164 at Madrid
Rome → Madrid → Gran Canaria
Timetable, Madrid time
19:10FR 9601 from Rome at the gate
15:05UX 9164 to Gran Canaria leaves the gate
19 h 55 apart on the timetable, overnight
UX 9164 leaves 19 h 55 after FR 9601 arrives on the timetable: more than half a day, so not a connection we count.