N, M = gets.split.map(&:to_i)                                                   
LRS = readlines.map { |l| l.split.map(&:to_i) }

dp = Array.new(M+1) { [] }
LRS.each_with_index do |(l, r), i|
  (l..r).each do |n|
    dp[n] << i+1
  end
end

(1..M).each do |m|
  tmp = []
  0.step(M, m) do |i|
    tmp = (tmp + dp[i]).uniq
  end
  p tmp.count
end