Every day, a train makes a trip from Alphatown to Betatown. Although the train is rarely late, on two different trips the train was late. On the first trip, when the train was travelling at an average speed of 56 km/h, the train was 27 minutes late. For the second trip, the train was travelling at an average speed of 54 km/h and was 42 minutes late. What is the distance between Alphatown and Betatown?