#include #include #include #include #include #include #include using namespace std; int calc(int a, int b, int c, int d) { int s = d, r = 0; r += d * s; s += c; r += c * s; s += b; r += b * s; s += a; r += a * s; return r; } int calc_perm_count(int a, int b, int c, int d) { if (a == d) return 1; if (a == c || b == d) return 4; if (a == b && c == d) return 6; if (a == b || b == c || c == d) return 12; return 24; } vector solve(int n, int m) { vector ans(n+1, 0); for (int a = 0; a <= m; a++) { for (int b = a; b <= m; b++) { for (int c = b; c <= m; c++) { for (int d = c; d <= m; d++) { if (int v = calc(a, b, c, d); v > n) break; else ans[v] += calc_perm_count(a, b, c, d); } } } } return ans; } int main() { int n, m; cin >> n >> m; vector ans = solve(n, m); for (int x : ans) printf("%d\n", x); }