#include <bits/stdc++.h>
template <typename T>
inline void read(T &x) {
  int am = 0;
  char k;
  while ((!isdigit(k = getchar())) && k != '-')
    ;
  if (k == '-') k = getchar(), am = 1;
  x = k - 48;
  while (isdigit(k = getchar())) x = x * 10 + k - 48;
  if (am) x = -x;
}
template <typename T>
inline void writep(T x) {
  if (x >= 10) writep(x / 10);
  putchar(x % 10 + 48);
}
template <typename T>
inline void write(T x) {
  if (x < 0) x = -x, putchar('-');
  writep(x);
}
template <typename T>
inline void writeln(T x) {
  write(x);
  putchar('\n');
}
template <typename T>
inline void writesp(T x) {
  write(x);
  putchar(' ');
}
using namespace std;
const int N = 1000002;
int n, m;
int l[N], r[N];
int main() {
  if (fopen("text.inp", "r")) {
    freopen("text.inp", "r", stdin);
    freopen("text.out", "w", stdout);
  } else {
  }
  read(n);
  read(m);
  for (int i = (1); i <= (n); i++) {
    read(l[i]);
    read(r[i]);
  }
  for (int d = (1); d <= (m); d++) {
    int dem = 0;
    for (int i = (1); i <= (n); i++) {
      if (l[i] - r[i] + 1 >= d)
        dem++;
      else {
        int tam = r[i] / d * d;
        if (tam >= l[i]) dem++;
      }
    }
    writeln(dem);
  }
}
