package main

import (
	"fmt"
)

func main() {
	var N, M int
	fmt.Scan(&N)
	fmt.Scan(&M)
	l := make([]int, N)
	r := make([]int, N)
	for i := 0; i < N; i++ {
		fmt.Scan(&l[i])
		fmt.Scan(&r[i])
	}

	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])
	}
}
