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))

                return



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))

                return



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))
                return


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))
                return


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))