def solve(input):
    # no code, did some calculations to get the minimum odd square number that's bigger than the input, then I calculated the indexes from that
    # in my case, 591 * 591 = 349281, x = 185, y = 295, diff = 480

input = 347991

solve(input)
