A ball of mass m is thrown vertically upward. another ball of mass 2 m is thrown an angle with the vertical. Both the balls stay in air for the same period of time. The ratio of the heights attained by the two balls respectively is $\frac{1}{x}$.The value of x is_______.