UX 56 then FR 394 at Madrid
Tocumen → Madrid → Ibiza
Timetable, Madrid time
13:05UX 56 from Tocumen at the gatealso MU 4993, EY 7511, HU 8226
06:40FR 394 to Ibiza leaves the gate
17 h 35 apart on the timetable, overnight
FR 394 leaves 17 h 35 after UX 56 arrives on the timetable: more than half a day, so not a connection we count.