output_description: Print the answer in M lines. The i-th line should contain the maximum number
  of the kinds of souvenirs that can be purchased if one takes a train stopping
  every i-th station.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N M
      l_1 r_1
      :
      l_{N} r_{N}
attempt: import sys
  
  print("弁当の種類を指定してください：")
  bentoType = int(sys.stdin.readline())
  print("駅の合計数を指定してください：")
  stationCnt = int(sys.stdin.readline())
  
  startSta = 0
  endSta = 0
  array = []
  for i in range(1, bentoType + 1):
      bentoMap = {}
      print("弁当" + str(i) + "の開始駅を指定してください：")
      startSta = int(sys.stdin.readline())
      print("弁当" + str(i) + "の終了駅を指定してください：")
      endSta = int(sys.stdin.readline())
  
      for start in range(startSta, endSta + 1, 1):
          bentoMap.update({str(start): 1})
      array.append(bentoMap)
  bentoCnt = 0
  for n in range(1, stationCnt + 1, 1):
      bentoCnt = 0
      for outMap in array:
          for m in range(0, stationCnt + 1, n):
              if str(m) in outMap:
                  bentoCnt += 1
                  break
      print("弁当" + str(n) + ":")
      print(bentoCnt)
  
problem_description: Statement
  
  Snuke has decided to play a game, where the player runs a railway company.
  There are M+1 stations on Snuke Line, numbered 0 through M. A train on Snuke
  Line stops at station 0 and every d-th station thereafter, where d is a
  predetermined constant for each train. For example, if d = 3, the train stops
  at station 0, 3, 6, 9, and so forth.
  
  There are N kinds of souvenirs sold in areas around Snuke Line. The i-th kind
  of souvenirs can be purchased when the train stops at one of the following
  stations: stations l_i, l_i+1, l_i+2, ..., r_i.
  
  There are M values of d, the interval between two stops, for trains on Snuke
  Line: 1, 2, 3, ..., M. For each of these M values, find the number of the
  kinds of souvenirs that can be purchased if one takes a train with that value
  of d at station 0. Here, assume that it is not allowed to change trains.
samples: [{"input": "3 3\n    1 2\n    2 3\n    3 3", "output": "3\n    2\n    2\n    \n\n  * If one takes a train stopping every station, three kinds of souvenirs can be purchased: kind 1, 2 and 3.\n  * If one takes a train stopping every second station, two kinds of souvenirs can be purchased: kind 1 and 2.\n  * If one takes a train stopping every third station, two kinds of souvenirs can be purchased: kind 2 and 3.\n\n* * *"}, {"input": "7 9\n    1 7\n    5 9\n    5 7\n    5 9\n    1 1\n    6 8\n    3 4", "output": "7\n    6\n    6\n    5\n    4\n    5\n    5\n    3\n    2"}]