#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 3e5;
int ls[MAX_N], rs[MAX_N], anses[MAX_N];
signed main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    for (int d = 1; d <= m; d++) {
      anses[d - 1] += (l - 1) / d * d + d <= r;
    }
  }
  for (int i = 0; i < m; i++) {
    printf("%d\n", anses[i]);
  }
}
