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

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