local x = io.read("*n")
for a = 0, 1000 do
  for b = 0, a - 1 do
    if a * a * a * a * a - b * b * b * b * b == x then
      print(a .." " .. b)
      os.exit()
    end
  end
end
for a = 0, 100 do
  for b = -100, 100 do
    if a * a * a * a * a - b * b * b * b * b == x then
      print(a .." " .. b)
      os.exit()
    end
  end
end
