Two masses are connected by a string which passes over a pulley accelerating upwards at a rate a as shown. If a1 and a2 are the accelerations of bodies 1 and 2 respectively, then what is the relationship between a1 and a2?