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