#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma warning(disable : 4996)
using namespace std;
template <typename T1, typename T2>
inline void chmin(T1& a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void chmax(T1& a, T2 b) {
  if (a < b) a = b;
}
std::random_device rd;
std::mt19937 mt(rd());
constexpr int MOD = 1e9 + 7;
constexpr int MAX = 200020;
const double pi = acos(-1);
constexpr double EPS = 1e-8;
constexpr long long INF = 1e16;
inline int popcount(unsigned int x) {
  x = x - ((x >> 1) & 0x55555555);
  x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
  return ((x + (x >> 4) & 0xF0F0F0F) * 0x1010101) >> 24;
}
inline int select32(unsigned int x, int k) {
  unsigned int a, b, c;
  int t, s;
  a = (x & 0x55555555) + ((x >> 1) & 0x55555555);
  b = (a & 0x33333333) + ((a >> 2) & 0x33333333);
  c = (b & 0x0f0f0f0f) + ((b >> 4) & 0x0f0f0f0f);
  t = (c & 0xff) + ((c >> 8) & 0xff);
  s = 0;
  s += ((t - k - 1) & 128) >> 3;
  k -= t & ((t - k - 1) >> 8);
  t = (c >> s) & 0xf;
  s += ((t - k - 1) & 128) >> 4;
  k -= t & ((t - k - 1) >> 8);
  t = (b >> s) & 0x7;
  s += ((t - k - 1) & 128) >> 5;
  k -= t & ((t - k - 1) >> 8);
  t = (a >> s) & 0x3;
  s += ((t - k - 1) & 128) >> 6;
  k -= t & ((t - k - 1) >> 8);
  t = (x >> s) & 0x1;
  s += ((t - k - 1) & 128) >> 7;
  return s;
}
struct FullyIndexableDictionary {
  static const int NOTFOUND = -1;
  static const int SELECTT_INTERVAL = 32;
  int length, blockslength, count;
  vector<unsigned int> blocks;
  vector<int> ranktable, selecttable0, selecttable1;
  FullyIndexableDictionary(int len) : length(len) {
    blocks.resize((blockslength = (len + 31) / 32) + 1);
  }
  inline void set(int i) { blocks[i / 32] |= 1 << i % 32; }
  void build() {
    if (length == 0) {
      count = 0;
      return;
    }
    ranktable.assign(blockslength + 1, 0);
    selecttable0.clear();
    selecttable1.clear();
    int prev0 = 0, prev1 = 0, count0 = 0, count1 = 0;
    for (int i = 0; i < blockslength; i++) {
      ranktable[i] = count1;
      count1 += popcount(blocks[i]);
      count0 = 32 * (i + 1) - count1;
      if (prev1 < (count1 + SELECTT_INTERVAL - 1) / SELECTT_INTERVAL)
        selecttable1.push_back(i),
            prev1 = (count1 + SELECTT_INTERVAL - 1) / SELECTT_INTERVAL;
      if (prev0 < (count0 + SELECTT_INTERVAL - 1) / SELECTT_INTERVAL)
        selecttable0.push_back(i),
            prev0 = (count0 + SELECTT_INTERVAL - 1) / SELECTT_INTERVAL;
    }
    ranktable[blockslength] = count1;
    selecttable1.push_back(blockslength - 1);
    selecttable0.push_back(blockslength - 1);
    count = count1;
  }
  inline bool access(int pos) const { return blocks[pos / 32] >> pos % 32 & 1; }
  inline int rank(int pos) const {
    int block_idx = pos / 32;
    return ranktable[block_idx] +
           popcount(blocks[block_idx] & (1U << pos % 32) - 1);
  }
  inline int rank(bool b, int pos) const {
    return b ? rank(pos) : pos - rank(pos);
  }
  inline int rank(bool b, int left, int right) const {
    return rank(b, right) - rank(b, left);
  }
  template <bool b>
  int select(int k) const {
    if ((b ? count : length - count) <= k) return NOTFOUND;
    int selecttable_index = k / SELECTT_INTERVAL;
    int l = (b ? selecttable1 : selecttable0)[selecttable_index],
        u = (b ? selecttable1 : selecttable0)[selecttable_index + 1] + 1;
    while (l + 1 < u) {
      int m = (l + u) / 2;
      ((b ? ranktable[m] : m * 32 - ranktable[m]) <= k ? l : u) = m;
    }
    return l * 32 + select32(b ? blocks[l] : ~blocks[l],
                             k - (b ? ranktable[l] : 32 * l - ranktable[l]));
  }
  inline int select(bool b, int k) const {
    return b ? select<true>(k) : select<false>(k);
  }
  inline int select(bool b, int k, int left) const {
    return select(b, rank(b, left) + k);
  }
};
inline unsigned int BITMASK(int i) { return (1 << i) - 1; }
struct WaveletMatrix {
  static const int NOTFOUND = -1;
  static const unsigned long long UNDEFINED = unsigned long long(-1);
  static const int MAX_BITSIZE = 64;
  int length, bitsize;
  unsigned long long maxval;
  vector<FullyIndexableDictionary> dicts;
  vector<int> mids;
  void init(const vector<unsigned long long>& data) {
    length = data.size();
    maxval = *max_element(data.begin(), data.end());
    if (1ULL << (8 * sizeof(unsigned long long) - 1) <= maxval)
      bitsize = 8 * sizeof(unsigned long long);
    else
      for (bitsize = 0; unsigned long long(1) << bitsize <= maxval; bitsize++)
        ;
    dicts.assign(bitsize, length);
    mids.assign(bitsize, 0);
    vector<unsigned long long> datacurrent(data), datanext(length);
    for (int bit = 0; bit < bitsize; bit++) {
      int pos = 0;
      for (int i = 0; i < length; i++)
        if ((datacurrent[i] >> (bitsize - bit - 1) & 1) == 0)
          datanext[pos++] = datacurrent[i];
      mids[bit] = pos;
      for (int i = 0; i < length; i++)
        if ((datacurrent[i] >> (bitsize - bit - 1) & 1) != 0)
          dicts[bit].set(i), datanext[pos++] = datacurrent[i];
      dicts[bit].build();
      datacurrent.swap(datanext);
    }
  }
  unsigned long long access(int pos) const {
    unsigned long long val = 0;
    for (int bit = 0; bit < bitsize; bit++) {
      bool dir = dicts[bit].access(pos);
      val = val << 1 | (dir ? 1 : 0);
      pos = dicts[bit].rank(dir, pos);
      if (dir) pos += mids[bit];
    }
    return val;
  }
  int rank(unsigned long long val, int left, int right) const {
    if (val > maxval) return 0;
    for (int bit = 0; bit < bitsize; bit++) {
      bool dir = val >> (bitsize - bit - 1) & 1;
      left = dicts[bit].rank(dir, left), right = dicts[bit].rank(dir, right);
      if (dir) left += mids[bit], right += mids[bit];
    }
    return right - left;
  }
  int rank(unsigned long long val, int right) const {
    return rank(val, 0, right);
  }
  int rank_all(unsigned long long val, int left, int right, int& out_lt,
               int& out_gt) const {
    if (val > maxval) {
      out_lt = right - left;
      out_gt = 0;
      return 0;
    }
    out_lt = out_gt = 0;
    for (int bit = 0; bit < bitsize; bit++) {
      bool dir = val >> (bitsize - bit - 1) & 1;
      int leftcount = dicts[bit].rank(dir, left),
          rightcount = dicts[bit].rank(dir, right);
      (dir ? out_lt : out_gt) += (right - left) - (rightcount - leftcount);
      left = leftcount, right = rightcount;
      if (dir) left += mids[bit], right += mids[bit];
    }
    return right - left;
  }
  inline int rank_lt(unsigned long long val, int left, int right) const {
    int tmp_lt, tmp_gt;
    rank_all(val, left, right, tmp_lt, tmp_gt);
    return tmp_lt;
  }
  inline int rangefreq(int left, int right, unsigned long long bottom,
                       unsigned long long up) {
    return rank_lt(up, left, right) - rank_lt(bottom, left, right);
  }
  int select(unsigned long long val, int k) const {
    if (val > maxval) return NOTFOUND;
    static int lefts[MAX_BITSIZE], rights[MAX_BITSIZE];
    int left = 0, right = length;
    for (int bit = 0; bit < bitsize; bit++) {
      lefts[bit] = left, rights[bit] = right;
      bool dir = val >> (bitsize - bit - 1) & 1;
      left = dicts[bit].rank(dir, left), right = dicts[bit].rank(dir, right);
      if (dir) left += mids[bit], right += mids[bit];
    }
    for (int bit = bitsize - 1; bit >= 0; bit--) {
      k = dicts[bit].select(val >> (bitsize - bit - 1) & 1, k, lefts[bit]);
      if (k == FullyIndexableDictionary::NOTFOUND || k >= rights[bit])
        return NOTFOUND;
      k -= lefts[bit];
    }
    return k;
  }
  int select(unsigned long long val, int k, int left) const {
    return select(val, k + rank(val, left));
  }
  void quantile(int left, int right, int k, unsigned long long& out_val,
                int& out_k) const {
    if (right - left <= k) {
      out_val = UNDEFINED;
      out_k = NOTFOUND;
      return;
    }
    unsigned long long val = 0;
    for (int bit = 0; bit < bitsize; bit++) {
      int count = dicts[bit].rank(true, left, right);
      bool dir = k < count;
      val = val << 1 | (dir ? 1 : 0);
      if (!dir) k -= count;
      left = dicts[bit].rank(dir, left), right = dicts[bit].rank(dir, right);
      if (dir) left += mids[bit], right += mids[bit];
    }
    out_val = val;
    out_k = k;
  }
  struct IdxVal {
    int idx;
    unsigned long long val;
    IdxVal() {}
    IdxVal(int i, unsigned long long v) : idx(i), val(v) {}
  };
  inline unsigned long long quantile(int left, int right, int k) const {
    unsigned long long tmp_val;
    int tmp_k;
    quantile(left, right, k, tmp_val, tmp_k);
    return tmp_val;
  }
  inline IdxVal quantile_idxval(int left, int right, int k) const {
    unsigned long long tmp_val;
    int tmp_k;
    quantile(left, right, k, tmp_val, tmp_k);
    return IdxVal(select(tmp_val, tmp_k, left), tmp_val);
  }
  inline unsigned long long maximum(int left, int right) const {
    return quantile(left, right, 0);
  }
  inline unsigned long long minimum(int left, int right) const {
    return quantile(left, right, right - left - 1);
  }
  void quantile_ranges(const vector<int>& lefts0, const vector<int>& rights0,
                       int k, unsigned long long& out_val, int& out_k) const {
    int n = lefts0.size();
    int width = 0;
    for (int i = 0; i < n; i++) width += rights0[i] - lefts0[i];
    if (width <= k) {
      out_val = UNDEFINED;
      out_k = NOTFOUND;
      return;
    }
    static vector<int> lefts, rights;
    lefts.assign(lefts0.begin(), lefts0.end());
    rights.assign(rights0.begin(), rights0.end());
    unsigned long long val = 0;
    for (int bit = 0; bit < bitsize; bit++) {
      int count = 0;
      for (int i = 0; i < n; i++) {
        count += dicts[bit].rank(true, lefts[i], rights[i]);
      }
      bool dir = k < count;
      val = val << 1 | (dir ? 1 : 0);
      if (!dir) k -= count;
      for (int i = 0; i < n; i++) {
        lefts[i] = dicts[bit].rank(dir, lefts[i]);
        rights[i] = dicts[bit].rank(dir, rights[i]);
        if (dir) lefts[i] += mids[bit], rights[i] += mids[bit];
      }
    }
    out_val = val;
    out_k = k;
  }
  inline IdxVal quantile_ranges_idxval(const vector<int>& lefts,
                                       const vector<int>& rights, int k) const {
    int n = lefts.size();
    unsigned long long tmp_val;
    int tmp_k;
    quantile_ranges(lefts, rights, k, tmp_val, tmp_k);
    for (int i = 0; i < n; i++) {
      if (tmp_k < rights[i] - lefts[i]) {
        return IdxVal(select(tmp_val, tmp_k, lefts[i]), tmp_val);
      }
      tmp_k -= rights[i] - lefts[i];
    }
    return IdxVal(NOTFOUND, UNDEFINED);
  }
  struct Range {
    int left, right;
    int bit;
    unsigned long long val;
    Range(int l, int r, int b, unsigned long long v)
        : left(l), right(r), bit(b), val(v) {}
  };
  template <typename F, typename FOut>
  int rectbfsk(const F& f, int left, int right, unsigned long long bottom,
               unsigned long long up, int k, FOut& out) const {
    int k0 = k;
    up = min(up, maxval + 1);
    priority_queue<Range, vector<Range>, F> q(f);
    q.push(Range(left, right, 0, 0));
    while (k && !q.empty()) {
      Range t = q.top();
      q.pop();
      if (t.bit == bitsize) {
        f.pushvalues(out, t, k);
      } else {
        int leftcount = dicts[t.bit].rank(false, t.left);
        int rightcount = dicts[t.bit].rank(false, t.right);
        if (rightcount - leftcount != 0 &&
            bottom <=
                ((t.val << (bitsize - t.bit)) | BITMASK(bitsize - t.bit - 1)))
          q.push(Range(leftcount, rightcount, t.bit + 1, t.val << 1));
        if ((t.right - t.left) - (rightcount - leftcount) != 0 &&
            (((t.val << 1 | 1) << (bitsize - t.bit - 1))) < up) {
          q.push(Range((t.left - leftcount) + mids[t.bit],
                       (t.right - rightcount) + mids[t.bit], t.bit + 1,
                       t.val << 1 | 1));
        }
      }
    }
    return k0 - k;
  }
  struct ValCount {
    unsigned long long val;
    int count;
    ValCount(unsigned long long v, int c) : val(v), count(c) {}
    ValCount() {}
  };
  struct FreqList {
    inline bool operator()(const Range& x, const Range& y) const {
      return x.right - x.left < y.right - y.left ||
             (x.right - x.left == y.right - y.left && x.val > y.val);
    }
    inline void pushvalues(vector<ValCount>& out, const Range& t,
                           int& k) const {
      out.push_back(ValCount(t.val, t.right - t.left));
      k--;
    }
  };
  inline int topk(int left, int right, unsigned long long bottom,
                  unsigned long long up, int k, vector<ValCount>& out) const {
    return rectbfsk<FreqList, vector<ValCount> >(FreqList(), left, right,
                                                 bottom, up, k, out);
  }
  template <typename F, typename FOut>
  struct DfsInfo {
    const F& f;
    FOut& out;
    unsigned long long bottom, up;
    DfsInfo(const F& f_, FOut& o, unsigned long long b, unsigned long long u)
        : f(f_), out(o), bottom(b), up(u) {}
  };
  template <typename F, typename FOut>
  void rectdfsk_dfs(const DfsInfo<F, FOut>& info, int bit,
                    unsigned long long val, int left, int right, int& k) const {
    if (bit == bitsize) {
      info.f.pushvalues(info.out, val, right - left, k);
      return;
    }
    int leftcount = dicts[bit].rank(left);
    int rightcount = dicts[bit].rank(right);
    if (F::MAXF) {
      if (k > 0 && rightcount - leftcount != 0 &&
          (((val << 1 | 1) << (bitsize - bit - 1)) < info.up))
        rectdfsk_dfs<F, FOut>(info, bit + 1, val << 1 | 1,
                              leftcount + mids[bit], rightcount + mids[bit], k);
      if (k > 0 && (right - left) - (rightcount - leftcount) != 0 &&
          (info.bottom <=
           ((val << (bitsize - bit)) | BITMASK(bitsize - bit - 1))))
        rectdfsk_dfs<F, FOut>(info, bit + 1, val << 1, left - leftcount,
                              right - rightcount, k);
    } else {
      if (k > 0 && (right - left) - (rightcount - leftcount) != 0 &&
          (info.bottom <=
           ((val << (bitsize - bit)) | BITMASK(bitsize - bit - 1))))
        rectdfsk_dfs<F, FOut>(info, bit + 1, val << 1, left - leftcount,
                              right - rightcount, k);
      if (k > 0 && rightcount - leftcount != 0 &&
          (((val << 1 | 1) << (bitsize - bit - 1)) < info.up))
        rectdfsk_dfs<F, FOut>(info, bit + 1, val << 1 | 1,
                              leftcount + mids[bit], rightcount + mids[bit], k);
    }
  }
  template <bool maxf>
  struct MinMaxList {
    enum { MAXF = maxf };
    inline void pushvalues(vector<ValCount>& out, unsigned long long val,
                           int count, int& k) const {
      out.push_back(ValCount(val, min(k, count)));
      k -= min(k, count);
    }
  };
  template <typename F, typename FOut>
  int rectdfsk(const F& f, int left, int right, unsigned long long bottom,
               unsigned long long up, int k, FOut& out) const {
    rectdfsk_dfs<F, FOut>(DfsInfo<F, FOut>(f, out, bottom, up), 0, 0, left,
                          right, k);
    return k;
  }
  template <bool maxf>
  int rectminmaxk(int left, int right, unsigned long long bottom,
                  unsigned long long up, int k, vector<ValCount>& out) const {
    return rectdfsk<MinMaxList<maxf>, vector<ValCount> >(
        MinMaxList<maxf>(), left, right, bottom, up, k, out);
  }
};
ostream& operator<<(ostream& o, const WaveletMatrix::IdxVal& idxval) {
  return o << "(" << idxval.idx << ": " << idxval.val << ")";
}
WaveletMatrix wm;
vector<unsigned long long> X, Y;
void solve() {
  int N, M;
  cin >> N >> M;
  vector<pair<int, int> > v(N);
  for (int i = 0; i < N; ++i) {
    cin >> v[i].first >> v[i].second;
    v[i].second++;
  }
  sort(v.begin(), v.end());
  ;
  for (int i = 0; i < N; ++i) {
    X.push_back((unsigned long long)v[i].first);
    Y.push_back((unsigned long long)v[i].second);
  }
  wm.init(Y);
  for (int d = 1; d <= M; d++) {
    int res = 0;
    for (int R = d; R <= M; R += d) {
      int idL = upper_bound(X.begin(), X.end(), (R - d)) - X.begin();
      int idR = upper_bound(X.begin(), X.end(), (R)) - X.begin();
      res += wm.rangefreq(idL, idR, R + 1, 2 * M);
    }
    cout << (res) << '\n';
  }
}
signed main() { solve(); }
