#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int n, m, x, y;
int cha[maxn], ans[maxn];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x, &y);
  }
  for (int i = 2; i <= m; i++) {
    cha[i] += cha[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    int res = 0;
    for (int j = 0; j <= m; j += i) {
      res += cha[j];
    }
    if (res <= n)
      printf("%d\n", res);
    else
      cout << n << endl;
  }
  return 0;
}
