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

r = float(input())

for D in range(1, 11):
    for d in range(2, 21, 2):
        res = (D * d) / (4.0 * math.sqrt((D / 2.0) ** 2 + (d / 2.0) ** 2))
        if abs(res - r) < 1E-5:
            print(D, d // 2)
            break# 1698236181.5589492