#![allow(unused_imports)]
#![allow(non_snake_case)]
use std::cmp::*;
use std::collections::*;
use std::io::Write;

#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), std::io::stderr());
            writeln!(err, "{} = {:?}", e, $e).unwrap()
        })*
    };
}

fn main() {
    let v = read_vec::<usize>();
    let (n, m) = (v[0], v[1]);
    let mut spans = vec![];
    for i in 0..n {
        let v = read_vec::<usize>();
        let (l, r) = (v[0], v[1]);
        spans.push((l, r));
    }

    // solve by 1
    let search1_max = min(400, m + 1);
    for mi in 1..search1_max {
        let mut ans = 0;
        for &(l, r) in &spans {
            if r - l >= mi || l % mi == 0 || r % mi < l % mi {
                ans += 1;
            }
        }
        println!("{}", ans);
    }

    // solve by 2
    for mi in search1_max..m + 1 {
        let mut cur = mi;
        let mut get = vec![false; n];
        while cur <= m {
            for (i, &(l, r)) in spans.iter().enumerate() {
                if cur >= l && cur <= r {
                    get[i] = true;
                }
            }
            cur += mi;
        }
        println!("{}", get.iter().filter(|&&x| x).count());
    }
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
