import math proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} proc scan(): int = while true: var k = getchar_unlocked() if k < '0': break result = 10 * result + k.ord - '0'.ord let a = scan() let b = scan() if a == b: echo (2*a).float.sqrt else: echo (a * a - b * b).abs.float.sqrt