import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

from itertools import combinations

def main():

    X = int(readline())

    p = [int(i) for i in range(-1000, 1001)]

    for b, a in combinations(p, 2):

        if a**5 - b**5 == X:

            A = a

            B = b

            break

    print((A, B))

if __name__ == '__main__':

    main()
import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



def f(a, b):

    return pow(a, 5) - pow(b, 5)

 

def main():

    x = int(readline())    

    for i  in range(-1000, 1001):

        for j in range(-1000, 1001):

            if i**5 - j**5 == x:

                print((i, j))

                return

if __name__ == '__main__':

    main()

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from itertools import combinations


def main():
    X = int(readline())
    p = [int(i) for i in range(-1000, 1001)]
    for b, a in combinations(p, 2):
        if a**5 - b**5 == X:
            A = a
            B = b
            break
    print((A, B))


if __name__ == "__main__":
    main()

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def f(a, b):
    return pow(a, 5) - pow(b, 5)


def main():
    x = int(readline())
    for i in range(-1000, 1001):
        for j in range(-1000, 1001):
            if i**5 - j**5 == x:
                print((i, j))
                return


if __name__ == "__main__":
    main()

-from itertools import combinations + + +def f(a, b): +    return pow(a, 5) - pow(b, 5) -    X = int(readline()) -    p = [int(i) for i in range(-1000, 1001)] -    for b, a in combinations(p, 2): -        if a**5 - b**5 == X: -            A = a -            B = b -            break -    print((A, B)) +    x = int(readline()) +    for i in range(-1000, 1001): +        for j in range(-1000, 1001): +            if i**5 - j**5 == x: +                print((i, j)) +                return