#include <bits/stdc++.h>
using namespace std;
int n, m, l[300005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    for (int j = 1; j <= m; j++)
      if (x % j == 0)
        l[j]++;
      else {
        int tg = x / j;
        tg = j * (tg + 1);
        if (tg <= y) l[j]++;
      }
  }
  for (int i = 1; i <= m; i++) cout << l[i] << '\n';
}
