Two masses m1 and m2 are connected by massless flexible and inextensible string passed over massless and frictionless pulley. The acceleration of centre of mass is