#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 ans[200'010]; int main() { for (; ~scanf("%d%d", &N, &M); ) { fill(ans, ans + N + 1, 0); for (int a = 0; a <= M; ++a) { for (int b = 0; b <= M; ++b) { const int s2 = a * a + (a + b) * b; if (s2 > N) { break; } for (int c = 0; c <= M; ++c) { const int s3 = s2 + (a + b + c) * c; if (s3 > N) { break; } for (int d = 0; d <= M; ++d) { const int s4 = s3 + (a + b + c + d) * d; if (s4 > N) { break; } ++ans[s4]; } } } } for (int s = 0; s <= N; ++s) { printf("%d\n", ans[s]); } } return 0; }