program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32), allocatable:: f(:)
    integer(int32):: x,y,z,n,v,i


    read*, n
    allocate(f(n), source=0)

    do x=1,100
        do y=1,100
            do z=1,100
                v = x*x + y*y + z*z +x*y + y*z + z*x
                if (v <= n) f(v)=f(v)+1
            end do
        end do
    end do

    do i=1,n
        print'(i0)', f(i)
    end do
end program main