def main():

    x = int(eval(input()))

    for a in range(-120, 121):

        for b in range(-120, 121):

            if (a**5-b**5==x):

                print((a, b))

                exit(0)

    



if __name__ == "__main__":

    main()
def main():

    x = int(eval(input()))

    for i in range(-120, 121):

        for j in range(-120, 121):

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

                print((i, j))

                exit(0)



if __name__ == "__main__":

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


if __name__ == "__main__":
    main()

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


if __name__ == "__main__":
    main()

-    for a in range(-120, 121): -        for b in range(-120, 121): -            if a**5 - b**5 == x: -                print((a, b)) +    for i in range(-120, 121): +        for j in range(-120, 121): +            if i**5 - j**5 == x: +                print((i, j))