N, M = gets.split.map(&:to_i)
a = Array.new(M+1) { [] }
N.times do |i|
  l, r = gets.split.map(&:to_i)
  (l..r).each { |j| a[j] << i }
end

(1..M).each do |m|
  r = []
  (1..M)
  .select { |i| i % m == 0 }
  .each { |i| r |= a[i] }
  p r.size
end
