package main

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

func main() {
  var n,m int = NextInts()
  var st []int = make([]int,m+2)
  var nn []int = make([]int,m+1)
  for i:=0;i<n;i++ {
    var l,r int = NextInts()
    st[l]++
    st[r+1]--
    for j:=1;j<m+1;j++ {
      nn[j] += (r-l)/j
    }
  }
  for i:=1;i<m+1;i++ { st[i] += st[i-1] }
  for i:=1;i<m+1;i++ {
    var t int = -nn[i]
    for j:=0;j<m+1;j+=i {
      t += st[j]
    }
    fmt.Println(t)
  }
}

var reader = bufio.NewReaderSize(os.Stdin,1000000)
func NextLine() string {
  var line,buffer []byte
  var isPrefix bool = true
  var err error
  for ;isPrefix; {
    line,isPrefix,err = reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer,line...)
  }
  return string(buffer)
}
func NextInts() (int,int) {
  var x,y int
  var s []string = strings.Split(NextLine()," ")
  x,_ = strconv.Atoi(s[0])
  y,_ = strconv.Atoi(s[1])
  return x,y
}