object Main {
  def main(args: Array[String]) {
    val List(n,m) = scala.io.StdIn.readLine().split(' ').map(_.toInt).toList
    val intervals = for(i <- 0 to n-1) yield {
      val List(l,r) = scala.io.StdIn.readLine().split(' ').map(_.toInt).toList
      (r-l+1)::List(l,r)
    }
    val sortedInt = intervals.sortBy(_.apply(0))

    for(d <- 1 to m) {
      var count = 0
      for (int <- sortedInt.takeWhile(_.apply(0) < d)) {
        if ((int(1)-1) / d < int(2) / d)
          count += 1
      }
      count += sortedInt.dropWhile(_.apply(0) < d).length
      println(count)
    }
  }
}
