import sys

import numpy as np



sys.setrecursionlimit(10**6)

readline = sys.stdin.readline

#read = sys.stdin.buffer.read



def main():

    X = int(readline())

    A = list(range(1, 201))

    B = list(range(-201, 201))

    for a in A:

        for b in B:

            tmp = pow(a, 5) - pow(b, 5)

            if X == tmp:

                print((a, b))

                return





if __name__ == "__main__":

    main()





def main():

    X = int(eval(input()))

    for A in range(0, 201):

        for B in range(-201, 201):

            if pow(A, 5) - pow(B, 5) == X:

                print((A, B))

                return



if __name__ == "__main__":

    main()    

import sys
import numpy as np

sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
# read = sys.stdin.buffer.read
def main():
    X = int(readline())
    A = list(range(1, 201))
    B = list(range(-201, 201))
    for a in A:
        for b in B:
            tmp = pow(a, 5) - pow(b, 5)
            if X == tmp:
                print((a, b))
                return


if __name__ == "__main__":
    main()

def main():
    X = int(eval(input()))
    for A in range(0, 201):
        for B in range(-201, 201):
            if pow(A, 5) - pow(B, 5) == X:
                print((A, B))
                return


if __name__ == "__main__":
    main()

-import sys -import numpy as np - -sys.setrecursionlimit(10**6) -readline = sys.stdin.readline -# read = sys.stdin.buffer.read -    X = int(readline()) -    A = list(range(1, 201)) -    B = list(range(-201, 201)) -    for a in A: -        for b in B: -            tmp = pow(a, 5) - pow(b, 5) -            if X == tmp: -                print((a, b)) +    X = int(eval(input())) +    for A in range(0, 201): +        for B in range(-201, 201): +            if pow(A, 5) - pow(B, 5) == X: +                print((A, B))