x=io.read("*n")
local range
for i=0,1000000000 do
    if i*i*i*i*i-(i-1)*(i-1)*(i-1)*(i-1)*(i-1)>=1000000000 then
        range=i
        break
    end
end

for i=-range,range do
    for j=-range,range do
        if i*i*i*i*i-j*j*j*j*j==x then
            print(i.." "..j)
            return
        end
    end
end