program C
    implicit none
    integer::N,i,j,kk
    real(8)::k,tmp
    read*,n
    do i = 1,3500
        do j = 1,3500
            tmp = 4*i*j - N*i - N*j
            if (tmp == 0.0d0 .OR. tmp < 0) then
                continue
            else
                k = real(i,8)*real(j,8)*real(N,8) / tmp
                kk = int(k)
                if (k == kk) then
                    print*,i,j,kk
                    stop
                else

                end if
            end if
        end do
    end do
end program C