//#define _GLIBCXX_DEBUG #include #define rep(i, n) for(int i=0; i; using vs = vector; using vi = vector; using vvi = vector; template using PQ = priority_queue; template using PQG = priority_queue, greater >; const int INF = 0xccccccc; const ll LINF = 0xcccccccccccccccLL; template inline bool chmax(T1 &a, T2 b) {return a < b && (a = b, true);} template inline bool chmin(T1 &a, T2 b) {return a > b && (a = b, true);} template istream &operator>>(istream &is, pair &p) { return is >> p.first >> p.second;} template ostream &operator<<(ostream &os, const pair &p) { return os << p.first << ' ' << p.second;} //head ll calc(ll i, ll j, ll k, ll l) { return i*(i+j+k+l) + j*(j+k+l) + k*(k+l) + l*l; } int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; vector ans(n+1); rep(i, m+1) { for(int j = i; j <= m and calc(i, j, 0, 0) <= n; j++) { for(int k = j; k <= m and calc(i, j, k, 0) <= n; k++) { for(int l = k; l <= m; l++) { ll u = calc(i, j, k, l); if(u > n) break; if(i == l) ans[u]++; else if(i == k or j == l) ans[u] += 4; else if(i == j and k == l) ans[u] += 6; else if(i == j or j == k or k == l) ans[u] += 12; else ans[u] += 24; } } } } for(ll x:ans) cout << x << '\n'; }