cho.sh
Notes
Loading...

Gifts

Time limit

2s

Memory limit

128 MB

Problem

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.

Input

The first line contains four integers N, L, W, and H.

Output

Print the maximum possible value of A. An absolute or relative error of at most 10^-9 is accepted.

Constraints

  • 1 ≤ N ≤ 1,000,000,000
  • 1 ≤ L, W, H ≤ 1,000,000,000