#include <bits/stdc++.h>
#define GET_MACRO(_1,_2,_3,_4,_5,NAME,...) NAME
#define pr(...) GET_MACRO(__VA_ARGS__,pr5,pr4,pr3,pr2,pr1)(__VA_ARGS__)
#define pr1(a) (#a)<<"="<<(a)
#define pr2(a,b) pr1(a)<<", "<<pr1(b)
#define pr3(a,b,c) pr2(a,b)<<", "<<pr1(c)
#define pr4(a,b,c,d) pr3(a,b,c)<<", "<<pr1(d)
#define pr5(a,b,c,d,e) pr4(a,b,c,d)<<", "<<pr1(e)
#define int long long
#define double long double
using namespace std;
const int N = 100010;
const int INF = 1LL<<55;
const int mod = (1e9)+7;
const double EPS = 1e-8;
const double PI = 6.0 * asin(0.5);
typedef pair<int,int> P;
typedef long long ll;
template<class T> T Max(T &a,T b){return a=max(a,b);}
template<class T> T Min(T &a,T b){return a=min(a,b);}
ostream& operator<<(ostream& o,P p){return o<<"("<<p.first<<","<<p.second<<")";}
istream& operator>>(istream& i,P &p){return i>>p.first>>p.second;}
ostream& operator<<(ostream& o,vector<auto> &a){int i=0;for(auto t:a)o<<(i++?" ":"")<<t;return o;}
istream& operator>>(istream& i,vector<auto> &a){for(auto &t:a)i>>t;return i;}
void prArr(auto a,string s=" "){int i=0;for(auto t:a)cout<<(i++?s:"")<<t;cout<<endl;}

class Count2D{
public:
  int n;
  vector<vector<int> > dat;
  
  Count2D(){}
  Count2D(int n_){
    n=1;
    while(n < n_) n*=2;
    dat.resize(2*n-1);
  }

  Count2D(int n_,vector<pair<int,int> > A){ //x,y
    n=1;
    while(n < n_) n*=2;
    dat.resize(2*n-1);
    
    for(auto a:A){
      int x,y; tie(x,y) = a;
      assert(x < n);
      dat[x+n-1].push_back(y);
    }
    
    function<void(int)> init=[&](int k){
      if(k >= n-1) {sort(dat[k].begin(),dat[k].end());return;}
      init(k*2+1), init(k*2+2);
      
      const auto &a = dat[k*2+1], &b = dat[k*2+2];
      auto &c = dat[k];
      int i = 0, j = 0;
      while(i < (int)a.size() || j < (int)b.size()){
        if(i == (int)a.size()) c.push_back(b[j++]);
        else if(j == (int)b.size()) c.push_back(a[i++]);
        else if(a[i] < b[j]) c.push_back(a[i++]);
        else c.push_back(b[j++]);
      }
    };
    init(0);
  }
  
  /*!!!!! O(nlog(n)) !!!!!*/
  void update(int x,int y){

    auto insert = [&](vector<int> &A,int a){
      A.push_back(a);
      int idx = (int)A.size()-1;
      while(idx && A[idx-1] > A[idx]) swap(A[idx-1],A[idx]),idx--;
    };
    
    x += n-1;
    insert(dat[x],y);
    while(x>0) x=(x-1)/2, insert(dat[x],y);
  }
  
  //[x,X)かつ[y,Y)の点の数を求める count(x,X,y,Y,0,0,n)
  // O(log(n) * log(n))
  int count(int x,int X,int y,int Y,int k=0,int l=0,int r=-1){
    if(r == -1) r = n, assert(x < n && X <= n);
    if(r<=x||X<=l)return 0;
    if(x<=l&&r<=X){
      int a = lower_bound(dat[k].begin(),dat[k].end(),y) - dat[k].begin();
      int b = upper_bound(dat[k].begin(),dat[k].end(),Y) - dat[k].begin();
      return b - a;
    }
    
    int vl=count(x,X,y,Y,k*2+1,l,(l+r)/2);
    int vr=count(x,X,y,Y,k*2+2,(l+r)/2,r);
    return vl + vr;
  }
};

signed main(){
  int n,m;
  cin>>n>>m;
  swap(n,m);

  vector<P> A(m);
  cin>>A;

  Count2D count(n+1,A);
  auto calc = [&](int k){
    int res = 0;
    for(int i=0;i<=n;i+=k) if(i+1 <= n) res += count.count(i+1,min(n+1,i+k+1),i+k,INF);
    return res;
  };
  
  for(int i=1;i<=n;i++){
    int ans = calc(i);
    cout<<ans<<endl;
  }
  
  return 0;
}


Measured memory_bytes: 78316