The pH scale measures the concentration of protons (H+) in a solution and, therefore, its acidity or alkalinity. The pH value of a solution is a number between 0 and 14; it is less than 7 if the solution is acidic, greater than 7 if the solution is basic, and 7 if it is neutral.
The formula for calculating pH is
The input consists of a number of test cases. Each test case contains 4 numbers on a line: two positive floating-point numbers specifying the acidity constant Ka and the original concentration of the acid (in moles/liter) added to the water, as well as two positive integers m and n indicating that each mole of acid molecules is dissolved into m moles of H+ ions and n moles of acid ions. The floating-point numbers are specified in scientific notation as shown below. The input is terminated with a line containing four zeros.
For each test case, print on a line the pH value of the solution, rounded to 3 decimal places.
1.6e-04 1.0e-01 1 1 1.6e-04 1.0e-01 4 1 1.5e-05 5.0e-02 1 2 0 0 0 0
2.407 2.101 3.216