#include <bits/stdc++.h>
static void print_int(int64_t n) {
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  if (n == 0) {
    putchar('0');
    return;
  }
  int s[20], len = 0;
  while (n > 0) {
    s[len++] = n % 10 + '0';
    n /= 10;
  }
  while (len > 0) {
    putchar(s[--len]);
  }
}
static int64_t read_int(void) {
  int prev = '\0';
  int c = getchar();
  while (!('0' <= c && c <= '9')) {
    prev = c;
    c = getchar();
  }
  int64_t res = 0;
  while ('0' <= c && c <= '9') {
    res = 10 * res + c - '0';
    c = getchar();
  }
  return prev == '-' ? -res : res;
}
typedef struct range {
  int32_t l, r;
} range;
const uint32_t radix_type_max = 17;
const uint32_t radix_type_begin = 0;
const uint32_t radix_width = 9;
const uint32_t radix_mask = (1 << 9) - 1;
static inline uint32_t radix_get_bit(range v, uint32_t shift) {
  return (uint32_t)(v.r - v.l) >> shift & radix_mask;
}
void radix_sort(range *a, uint32_t n) {
  range *const array = (range *)calloc(3 * n, sizeof(range));
  range **bucket = (range **)calloc(1 << radix_width, sizeof(range *));
  uint32_t *len = (uint32_t *)calloc(2 << radix_width, sizeof(uint32_t));
  uint32_t *max_len = len + (1 << radix_width);
  for (uint32_t shift = radix_type_begin; shift < radix_type_max;
       shift += radix_width) {
    range *p = array;
    memset(len, 0, sizeof(uint32_t) << (radix_width + 1));
    for (uint32_t i = 0; i < n; ++i) {
      uint32_t bit = radix_get_bit(a[i], shift);
      if (len[bit] == max_len[bit]) {
        for (uint32_t j = 0; j < len[bit]; ++j) {
          p[j] = bucket[bit][j];
        }
        max_len[bit] = 2 * max_len[bit] + 1;
        bucket[bit] = p;
        p += max_len[bit];
      }
      bucket[bit][len[bit]++] = a[i];
    }
    for (uint32_t bit = 0, i = 0; bit < (1 << radix_width); ++bit) {
      for (uint32_t j = 0; j < len[bit]; ++j, ++i) {
        a[i] = bucket[bit][j];
      }
    }
  }
  for (uint32_t i = 0; i + 1 < n; ++i) {
    if (a[i].r - a[i].l > a[i + 1].r - a[i + 1].l) {
      exit(1);
    }
  }
  free(array);
  free(bucket);
  free(len);
}
void add(int32_t *bit, int32_t x, int32_t v) {
  int32_t n = bit[0];
  for (int32_t i = x; i <= n; i += i & -i) {
    bit[i] += v;
  }
}
int32_t find(int32_t *bit, int32_t x) {
  int32_t sum = 0;
  for (int32_t i = x; i > 0; i -= i & -i) {
    sum += bit[i];
  }
  return sum;
}
void run(void) {
  int32_t n = read_int();
  int32_t m = read_int();
  range *p = (range *)calloc(n, sizeof(range));
  for (int32_t i = 0; i < n; ++i) {
    p[i].l = read_int();
    p[i].r = read_int() + 1;
  }
  radix_sort(p, n);
  int32_t *bit = (int32_t *)calloc(m + 2, sizeof(int32_t));
  bit[0] = m + 1;
  for (int32_t d = 1, i = 0; d <= m; ++d) {
    for (; i < n && p[i].r - p[i].l < d; ++i) {
      add(bit, p[i].l, 1);
      add(bit, p[i].r, -1);
    }
    int32_t ans = n - i;
    for (int32_t j = d; j <= m; j += d) {
      ans += find(bit, j);
    }
    print_int(ans);
    putchar('\n');
  }
}
int main(void) {
  run();
  return 0;
}
