#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
const int maxm = 1e5 + 5;
int a[maxn][2], c[maxm], d[maxm];
int main() {
  int m, n;
  memset(d, 0, sizeof(d));
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < 2; j++) {
      cin >> a[i][j];
    }
    c[i] = a[i][1] - a[i][0];
  }
  for (int j = n; j > 0; j--) {
    for (int i = 0; i < m; i++) {
      if (a[i][1] % j <= c[i]) ++d[j];
    }
  }
  for (int i = 1; i <= n; i++) cout << d[i] << endl;
}
