#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, m, l, r;
  cin >> n;
  cin >> m;
  long nm[n][m];
  for (int i = 0; i < n; i++) {
    cin >> l;
    cin >> r;
    for (int j = 0; j < m; j++) {
      if (l <= j + 1 && j + 1 <= r) {
        nm[i][j] = 1;
      } else {
        nm[i][j] = 0;
      }
    }
  }
  int bnt[n];
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      bnt[j] = 0;
    }
    for (int j = i; j < m; j = j + i + 1) {
      for (int k = 0; k < n; k++) {
        if (nm[k][j] == 1) {
          bnt[k] = 1;
        }
      }
    }
    int ans = 0;
    for (int a = 0; a < n; a++) {
      if (bnt[a] == 1) {
        ans++;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
