#include <bits/stdc++.h>

using namespace std;

int main(){
  int N,M;
  cin >> N >> M;
  int l[N+1],r[N+1];
  int i;
  for(i = 1;i <= N;i++){
    cin >> l[i] >> r[i];
  }

  int count[M+1] = {0};
  int d;

  for(d = 1;d <= M; d++){
  for(i = 1;i <= N; i++){
    if(d != r[i] && d!=l[i] && r[i]-l[i] + 1 < d && r[i] % d >= l[i] % d){
      continue;
    }
    count[d]++;
  }
  }

  for(i=1;i <= M;i++){
    cout << count[i] << endl;
  }





}