program name
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int64):: x,n,i,j
    integer(int64), allocatable:: f(:)

    read*, x
    n=0
    do while( n**5 <= 100000000000000000_8)
        n=n+1
    end do
    allocate(f(-n:n))

    do i=-n,n
        f(i) = i**5
    end do

    do i=-n,n
        do j=-n,n
            if (f(i)-f(j) == x) then
                print*, i,j 
                stop
            end if
        end do
    end do
end program name