program ABC166_D
  integer::A
  integer::C(100000)
  C=0
  read(*,*)X
  N=0
  A=int(sqrt(X))
  do i=1,A
     if(int(X)/i*i==int(X)) then
        N=N+1
        C(N)=i
     end if
  end do
  do i=1,N
     do j=-100000,100000
        if(C(i)*(5*j**4+10*(j**3)*C(i)+10*(j**2)*(C(i)**2)+5*j*(C(i)**3)+C(i)**4)==X) then
           write(*,*)C(i)+j,j
           stop
        end if
     end do
  end do
end program ABC166_D