#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) { 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] += 24; } { #define d c const int s = ((a+b+c+d)*(a+b+c+d) + a*a + b*b + c*c + d*d) / 2; #undef d if (s > N) { break; } ans[s] += 12; } } #define c b { 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] += 12; } #define d c { 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] += 4; } #undef d } #undef c } #define b a { for (int c = 0; c < b; ++c) { 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] += 12; } #define d c { 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] += 6; } #undef d } #define c b { 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] += 4; } #define d c { 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] += 1; } #undef d } #undef c } #undef b } for (int s = 0; s <= N; ++s) { printf("%d\n", ans[s]); } } return 0; }