#include #include using namespace std; int get_permutations(int a, int b, int c, int d) { if (a == b && b == c && c == d) return 1; if (a == b && b == c || b == c && c == d) return 4; if (a == b && c == d) return 6; if (a == b || b == c || c == d) return 12; return 24; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int N, M; if (!(cin >> N >> M)) return 0; vector counts(N + 1, 0); for (int a = 0; a <= M; ++a) { long long a2 = (long long)a * a; for (int b = a; b <= M; ++b) { long long ab_sum = a2 + (long long)b * b + (long long)a * b; if (ab_sum > N) break; for (int c = b; c <= M; ++c) { long long abc_sum = ab_sum + (long long)c * c + (long long)a * c + (long long)b * c; if (abc_sum > N) break; for (int d = c; d <= M; ++d) { long long total = abc_sum + (long long)d * d + (long long)a * d + (long long)b * d + (long long)c * d; if (total <= N) { counts[total] += get_permutations(a, b, c, d); } else { break; } } } } } for (int n = 0; n <= N; ++n) { cout << counts[n] << "\n"; } return 0; }