#include "testlib.h" #include using namespace std; int main(){ int n, m; n = inf.readInt(1, 160000); inf.readSpace(); m = inf.readInt(1, (int)sqrt(n)); inf.readEoln(); inf.readEof(); int ans[1600001] = {}; 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 k = a * a + b * (a + b) + c * (a + b + c) + d * (a + b + c + d); if(k > n) break; if(a == b){ if(b == c){ if(c == d) ans[k] += 1; else ans[k] += 4; } else{ if(c == d) ans[k] += 6; else ans[k] += 12; } } else{ if(b == c){ if(c == d) ans[k] += 4; else ans[k] += 12; } else{ if(c == d) ans[k] += 12; else ans[k] += 24; } } } for(int i = 0; i <= n; i++) cout << ans[i] << '\n'; }