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

x= float(input())
for a in range (1,10+1):
    for h in range (1,10+1):
        if abs(x - (  (a*h)/ (2* m.sqrt(a*a/4 +h*h)  )) ) <= 10**-5: 
            print (a,h)
            quit()