Time limit
2s
Memory limit
128 MB
Minsik has N small boxes of the same size to give as gifts. Every small box is a cube with side length A, so its size is A × A × A.
He wants to put all of these small boxes into a rectangular box of size L × W × H. Every small box must be entirely inside the large box, and each edge of every small box must be parallel to an edge of the large box.
Given N, L, W, and H, find the maximum possible value of A.
The first line contains four integers N, L, W, and H.
Print the maximum possible value of A. An absolute or relative error of at most 10^-9 is accepted.
1 ≤ N ≤ 1,000,000,0001 ≤ L, W, H ≤ 1,000,000,000