D = int(input())
d = lambda m, n: pow(n, 2) - pow(m, 2)
for i in range(D + 1):
    l, r = 0, i
    while r - l > 1:
        m = (l + r) // 2
        if d(m, i) >= D:
            l = m
        else:
            r = m - 1
    if d(l, i) == D:
        print(l, i)
        quit()
print('impossible')

005869a6cfe6cdd5150e6fecdbc0a70b50124641
<mask token>

<mask token>
for i in range(D + 1):
    l, r = 0, i
    while r - l > 1:
        m = (l + r) // 2
        if d(m, i) >= D:
            l = m
        else:
            r = m - 1
    if d(l, i) == D:
        print(l, i)
        quit()
print('impossible')

D = int(input())
d = lambda m, n: pow(n, 2) - pow(m, 2)
for i in range(D + 1):
    l, r = 0, i
    while r - l > 1:
        m = (l + r) // 2
        if d(m, i) >= D:
            l = m
        else:
            r = m - 1
    if d(l, i) == D:
        print(l, i)
        quit()
print('impossible')
