#pragma GCC optimize ("Ofast") #pragma GCC optimize ("unroll-loops") #pragma GCC target ("avx") #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using Int = long long; template ostream &operator<<(ostream &os, const pair &a) { return os << "(" << a.first << ", " << a.second << ")"; }; template void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; } template bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; } template bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; } int N, M; int main() { for (; ~scanf("%d%d", &N, &M); ) { int ans[160'010] = {}; for (int a = 0; a <= M; ++a) { for (int b = 0; b <= a; ++b) { for (int c = 0; c <= b; ++c) { if (((a+b+c)*(a+b+c) + a*a + b*b + c*c) / 2 > N) { break; } for (int d = 0; d <= c; ++d) { const int s = ((a+b+c+d)*(a+b+c+d) + a*a + b*b + c*c + d*d) / 2; if (s > N) { break; } ans[s] += ((b > c) ? (a > b) ? (c > d) ? 24 : 12 : (c > d) ? 12 : 6 : (a > b) ? (c > d) ? 12 : 4 : (c > d) ? 4 : 1); } } } } for (int s = 0; s <= N; ++s) { printf("%d\n", ans[s]); } } return 0; }