def main():

    x = int(eval(input()))

    for i in range(120):

        for j in range(i, -i, -1):

            cal = i ** 5 - j ** 5

            if cal == x:

                print((i, j))

                exit()





if __name__ == '__main__':

    main()

def main():

    x = int(eval(input()))

    for i in range(120):

        a = i ** 5

        for j in range(i, -i, -1):

            b = j ** 5

            if a - b == x:

                print((i, j))

                exit()





if __name__ == '__main__':

    main()

def main():
    x = int(eval(input()))
    for i in range(120):
        for j in range(i, -i, -1):
            cal = i**5 - j**5
            if cal == x:
                print((i, j))
                exit()


if __name__ == "__main__":
    main()

def main():
    x = int(eval(input()))
    for i in range(120):
        a = i**5
        for j in range(i, -i, -1):
            b = j**5
            if a - b == x:
                print((i, j))
                exit()


if __name__ == "__main__":
    main()

+        a = i**5 -            cal = i**5 - j**5 -            if cal == x: +            b = j**5 +            if a - b == x: