#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T alex(T x) {
  return (x > 0) ? x : -x;
}
template <class T>
void read(T& x) {
  x = 0;
  T f = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') f = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  x *= f;
}
int n, q;
int rot[300005];
vector<int> ins[300005];
struct Tree {
  int l, r, c;
} T[2333333];
int cnt;
int Newnode(int lst) {
  T[++cnt] = T[lst];
  return cnt;
}
void insert(int& rot, int l, int r, int p) {
  rot = Newnode(rot);
  T[rot].c++;
  if (l == r) return;
  int mid = (l + r) >> 1;
  if (p <= mid)
    insert(T[rot].l, l, mid, p);
  else
    insert(T[rot].r, mid + 1, r, p);
}
int query(int rot, int l, int r, int p) {
  if (l >= p) return T[rot].c;
  int mid = (l + r) >> 1;
  if (p <= mid)
    return query(T[rot].l, l, mid, p) + query(T[rot].r, mid + 1, r, p);
  else
    return query(T[rot].r, mid + 1, r, p);
}
int solve(int ind) {
  int res = 0;
  for (int i = ind, lst = 0; i <= n; i += ind, lst += ind) {
    res += query(rot[i], 1, n, i) - query(rot[lst], 1, n, i);
  }
  return res;
}
int main() {
  read(n);
  read(q);
  for (int i = (1); i <= (q); i++) {
    int l, r;
    read(l);
    read(r);
    ins[l].push_back(r);
  }
  for (int i = (1); i <= (n); i++) {
    rot[i] = rot[i - 1];
    for (int k = (0); k < (ins[i].size()); k++) insert(rot[i], 1, n, ins[i][k]);
  }
  for (int i = (1); i <= (n); i++) printf("%d\n", solve(i));
  return 0;
}
