package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func configure(scanner *bufio.Scanner) {
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
}
func getNextString(scanner *bufio.Scanner) string {
	scanned := scanner.Scan()
	if !scanned {
		panic("scan failed")
	}
	return scanner.Text()
}
func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}
func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}
func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}
func main() {
	fp := os.Stdin
	wfp := os.Stdout
	extra := 0
	if os.Getenv("I") == "IronMan" {
		fp, _ = os.Open(os.Getenv("END_GAME"))
		extra = 100
	}
	scanner := bufio.NewScanner(fp)
	configure(scanner)
	writer := bufio.NewWriter(wfp)
	defer func() {
		r := recover()
		if r != nil {
			fmt.Fprintln(writer, r)
		}
		writer.Flush()
	}()
	solve(scanner, writer)
	for i := 0; i < extra; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
}
func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	n := getNextInt(scanner)
	m := getNextInt(scanner)
	seg := newSegment(m + 1)
	for i := 0; i < n; i++ {
		l := getNextInt(scanner)
		r := getNextInt(scanner)
		seg.update(l, r+1, seg.add)
		pr := l
		for d := 2; 1 < pr; d++ {
			ll, rr := upper(l, d), r/d
			if ll < min(rr+1, pr) {
				seg.update(ll, min(rr+1, pr), seg.add)
			}
			pr = ll
			d = max(d, upperd(ll, r))
		}
	}
	for i := 1; i < m+1; i++ {
		fmt.Fprintln(writer, seg.query(i, seg.add))
	}
}
func upperd(ll, rr int) int {
	l := -1
	r := rr
	for l+1 < r {
		m := (l + r) >> 1
		if m < ll {
			l = m
			continue
		}
		r = m
	}
	return l
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	return -min(-a, -b)
}
func upper(x, d int) int {
	return (x + d - 1) / d
}

type segment [][]int

func newSegment(n int) segment {
	seg := make(segment, 0)
	for n > 1 {
		seg = append(seg, make([]int, n))
		n = (n + 1) >> 1
	}
	seg = append(seg, make([]int, 1))
	return seg
}
func (seg segment) update(l, r int, f func(int, int) int) {
	for h := 0; h < len(seg) && l < r; h++ {
		if l&1 == 1 {
			seg[h][l] = f(1, seg[h][l])
			l++
		}
		l >>= 1
		if r&1 == 1 {
			seg[h][r-1] = f(1, seg[h][r-1])
		}
		r >>= 1
	}
}
func (seg segment) query(i int, f func(int, int) int) int {
	v := seg[0][i]
	for h := 1; h < len(seg); h++ {
		i >>= 1
		v = f(seg[h][i], v)
	}
	return v
}
func (seg segment) add(x, y int) int {
	return x + y
}
