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