#include<cstdio> #include<algorithm> usingnamespace std; constint N = 1e5 + 10; int n, m, c[N]; intmain() { scanf("%d%d", &n, &m); for (int i = 1, x, y; i <= n; i++) { scanf("%d%d", &x, &y); c[x]++; c[y + 1]--; x--; for (int l = 1, r; l <= x; l = r + 1) { r = min(x / (x / l), y / (y / l)); if (x / l < y / l) { c[l]++; c[r + 1]--; } } } for (int i = 1, s = c[1]; i <= m; i++, s += c[i]) printf("%d\n", s); return0; }