#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  scanf("%d %d\n", &N, &M);
  vector<int> results(M, 0);
  for (int i = 0; i < N; ++i) {
    int li, ri;
    scanf("%d %d\n", &li, &ri);
    unordered_set<int> divisors;
    for (int i = 1; i <= ri - li + 1; ++i) divisors.emplace(i);
    for (int i = ri - li + 1; i <= ri; ++i) {
      if ((ri / i) * i >= li) divisors.emplace(i);
    }
    for (auto& divisor : divisors) ++results[divisor - 1];
  }
  for (auto& result : results) {
    printf("%d\n", result);
  }
}
