Two bodies A and B and their masses in the ratio 3:1 and kinetic energy in the ratio 1:3, then ratio of their velocities is