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

	for A = 1 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

	if A^5 - B^5 = X then 

	else

		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

	end if

	if A^5 - B^5 = X then 

	else

		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

	end if

	if A^5 - B^5 = X then 

	else

		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

	end if

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

  End Sub
End Module

