program sample
    implicit none
  
    integer(8) :: i,j,k,m,n,l,r,d,a(10000),x,y,z
    
    read(*,*) n
    a(:)=0
    do i=1,100
        do j=1,100
            do k=1,100
                x=i**2+j**2+k**2+i*j+j*k+k*i
                if(x<=10000)then
                    a(x)=a(x)+1
                end if
            end do
        end do
    end do
    do i=1,n
        write(*,*) a(i)
    end do
    stop
end program sample
  


  

