The input contains a single floating-point number *x* with exactly 6 decimal places (0 &lt; *x* &lt; 5).
from math import sqrt


d = 1e-5
r = float(input())
for a in range(1, 11):
    for h in range(1, 11):
        if abs((h * a / 2) / sqrt((h ** 2) + ((a / 2) ** 2)) - r) <= d:
            ans_a = a
            ans_h = h
print(ans_a, ans_h)
