defmodule Main do
  def main do
  	a = IO.gets("") |> String.trim |> String.to_integer
    for x <- -1000..1000,
    	y <- -1000..1000,
    	x * x * x * x * x - y * y * y * y * y == a do	
    	IO.puts "#{a} #{b}"
	end
  end
end