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 scala.io.StdIn.readLine().split(' ').map(_.toInt).toList
    
    for(d <- 1 to m) {
      var count = 0
      for (j <- 0 to n-1) {
        if((intervals(j)(0)-1) / d < intervals(j)(1) / d)
          count += 1
      }
      println(count)
    }
  }
}
