package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	var N, M int
	sc.Scan()
	nm := strings.Split(sc.Text(), " ")
	N, _ = strconv.Atoi(nm[0])
	M, _ = strconv.Atoi(nm[1])
	l := make([]int, N)
	r := make([]int, N)
	for i := 0; i < N; i++ {
		sc.Scan()
		lr := strings.Split(sc.Text(), " ")
		l[i], _ = strconv.Atoi(lr[0])
		r[i], _ = strconv.Atoi(lr[1])
	}

	answers := make([]int, M+1) // answer[d]: 名産品の種類数
	for d := 1; d <= M; d++ {
		for i := 0; i < N; i++ {
			// 間隔 d のときに種類 i の名産品を買えるかどうか
			dif := r[i] - l[i] + 1
			rRemain := r[i] % d
			lRemain := l[i] % d
			if dif >= d || rRemain == 0 || lRemain == 0 || rRemain < lRemain {
				answers[d]++
			}
		}
	}
	for d := 1; d <= M; d++ {
		fmt.Println(answers[d])
	}
}
