Ryanair agrees to pay for flights on rival airlines