{"raw_statement":[{"iden":"problem statement","content":"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.\nThere 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$.\nThere 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."},{"iden":"constraints","content":"*   $1 ≦ N ≦ 3 × 10^{5}$\n*   $1 ≦ M ≦ 10^{5}$\n*   $1 ≦ l_i ≦ r_i ≦ M$"},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$\n$l_1$ $r_1$\n$:$\n$l_{N}$ $r_{N}$"},{"iden":"sample input 1","content":"3 3\n1 2\n2 3\n3 3"},{"iden":"sample output 1","content":"3\n2\n2\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$."},{"iden":"sample input 2","content":"7 9\n1 7\n5 9\n5 7\n5 9\n1 1\n6 8\n3 4"},{"iden":"sample output 2","content":"7\n6\n6\n5\n4\n5\n5\n3\n2"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}