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