How to Outsmart Dynamic Pricing for Flights and Hotels