imports System

Module Module1
  public Sub Main()

    Dim X as Double = Console.ReadLine()

	Dim A as Double
	Dim B as Double

	A = 0
    B = 0

	if X < 0 then

		for A = 0 to X Step -1

			for B = 0 to -X Step 1

				if A^5 - B^5 = X then 

					exit for

				elseif A^5 - B^5 < X then
					
					exit for
					
				end if

			next 

			if A^5 - B^5 = X then 
				exit for
			end if

		next

		console.writeLine(A.tostring & " " & B.tostring)

	elseif X > 0 then

		for A = 0 to X Step 1

			for B = 0 to -X Step -1

				if A^5 - B^5 = X then 

					exit for

				elseif A^5 - B^5 > X then
					
					exit for
					
				end if

			next 

			if A^5 - B^5 = X then 
				exit for
			end if

		next

		console.writeLine(A.tostring & " " & B.tostring)

	else 

		console.writeLine("1".tostring & " " & "1".tostring)

	end if
	

  End Sub
End Module

