#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
constexpr int DEBUG = 0;
template <typename T, typename U>
class ROPGSegmentTree {
 private:
  function<U(U, U)> op_merge_fn;
  U empty_op;
  function<T(T, U)> apply_op_fn;
  int num_nodes;
  vector<T> values;
  vector<U> op_nodes;
  void DoLazyPropagation(int node_index) {
    if (op_nodes[node_index] != empty_op) {
      if (node_index < num_nodes / 2) {
        op_nodes[2 * node_index] =
            op_merge_fn(op_nodes[2 * node_index], op_nodes[node_index]);
        op_nodes[2 * node_index + 1] =
            op_merge_fn(op_nodes[2 * node_index + 1], op_nodes[node_index]);
      } else {
        int value_index = node_index - num_nodes / 2;
        values[value_index] =
            apply_op_fn(values[value_index], op_nodes[node_index]);
      }
      op_nodes[node_index] = empty_op;
    }
  }
  void ApplyOpRangeInternal(int node_index, int node_l, int node_r, int l,
                            int r, U op) {
    DoLazyPropagation(node_index);
    if (node_r <= l || r <= node_l) return;
    if (l <= node_l && node_r <= r) {
      op_nodes[node_index] = op;
      DoLazyPropagation(node_index);
      return;
    }
    int node_m = (node_l + node_r) / 2;
    ApplyOpRangeInternal(2 * node_index, node_l, node_m, l, r, op);
    ApplyOpRangeInternal(2 * node_index + 1, node_m, node_r, l, r, op);
  }
  T GetInternal(int node_index, int node_l, int node_r, int i) {
    DoLazyPropagation(node_index);
    if (node_index >= num_nodes / 2) {
      return values[i];
    }
    int node_m = (node_l + node_r) / 2;
    if (i < node_m) {
      return GetInternal(2 * node_index, node_l, node_m, i);
    } else {
      return GetInternal(2 * node_index + 1, node_m, node_r, i);
    }
  }

 public:
  ROPGSegmentTree(function<U(U, U)> op_merge_fn, U empty_op,
                  function<T(T, U)> apply_op_fn, vector<T> values)
      : op_merge_fn(op_merge_fn),
        empty_op(empty_op),
        apply_op_fn(apply_op_fn),
        values(values) {
    int n = values.size();
    num_nodes = 1;
    while (num_nodes < n) num_nodes *= 2;
    num_nodes *= 2;
    op_nodes = vector<U>(num_nodes, empty_op);
  }
  void ApplyOpRange(int l, int r, U op) {
    if (l >= r) return;
    return ApplyOpRangeInternal(1, 0, num_nodes / 2, l, r, op);
  }
  T Get(int i) { return GetInternal(1, 0, num_nodes / 2, i); }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  ROPGSegmentTree<int, int> tree([](int x, int y) { return x + y; }, 0,
                                 [](int x, int y) { return x + y; },
                                 vector<int>(m + 1));
  for (int i = 0; i < n; i++) {
    if (DEBUG) cout << "i: " << i << endl;
    int l, r;
    cin >> l >> r;
    vector<pair<int, int>> updates;
    for (int s = 1; s <= 400; s++) {
      int a = (l + (s - 1)) / s;
      int b = r / s + 1;
      if (a < b) {
        updates.push_back({a, -1});
        updates.push_back({b, 1});
      }
    }
    for (int d = 1; d <= 400; d++) {
      if (l % d == 0 || (l / d != r / d)) {
        updates.push_back({d, -1});
        updates.push_back({d + 1, 1});
      }
    }
    sort(updates.begin(), updates.end());
    int sum = 0;
    int start = -1;
    vector<pair<int, int>> segments;
    for (const auto& pair : updates) {
      int x, v;
      tie(x, v) = pair;
      if (sum == 0 && v < 0) {
        start = x;
      }
      sum += v;
      if (sum == 0) {
        segments.push_back({start, x});
        start = -1;
      }
    }
    for (const auto& segment : segments) {
      if (DEBUG) {
        cout << segment.first << " " << segment.second << endl;
      }
      tree.ApplyOpRange(segment.first, segment.second, 1);
    }
  }
  for (int d = 1; d <= m; d++) {
    cout << tree.Get(d) << "\n";
  }
}
