UX 175 then JA 7019 at Lima
Madrid → Lima → Cusco
Timetable, Lima time
05:50UX 175 from Madrid at the gate
05:20JA 7019 to Cusco leaves the gate
23 h 30 apart on the timetable, overnight
JA 7019 leaves 23 h 30 after UX 175 arrives on the timetable: more than half a day, so not a connection we count.