Two blocks A and B of masses 2 m and m, respectively, are connected by a massless and inextensible string. The whole system is suspended by a massless spring as shown in the figure. The magnitudes of a acceleration of A and B immediately after the string is cut, are respectively