program xyz_triplets
    integer(8) n, i, x, y, z
    integer(8) :: cnt(10000)
    read *, n
    cnt = 0
        do x = 1, 100
            do y = 1, 100
                do z = 1, 100
                    if((x**2+y**2+z**2+x*y+z*x+y*z) == n)then
                        cnt(i) = cnt(i) + 1
                    end if
                end do
            end do
        end do
    do i = 1, n
        print "('',i0)", cnt(i)
    end do
end program