# Add or remove imports
from yogi import scan

# Change 'function_name' to your function name,
# and addapt the way input must be read to your needs.
n = scan(int)
d = scan(int)
while n is not None:
    print(f"captures({n},{d}) = {captures(n,d):.6f}")
    n = scan(int)
    d = scan(int)
print(f">>> captures(8,3) + captures(11,5) = {(captures(8,3)+captures(11,5)):.6f}")

print("---- Additional jutge tests")
for n,d in [(2,1), (3,3), (10,10), (1,6)] :
    print(f"captures({n},{d}) = {captures(n,d):.6f}")
for n,d,m,c in [(2,1,3,3), (10,10,1,6)] :
    print(f"captures({n},{d}) + captures({m},{c}) = {(captures(n,d)+captures(m,c)):.6f}")
print("---- End additional jutge tests")