cin >> m >> n; for (int i = 1; i <= m; ++i) { int x, y; cin >> x >> y; --x; for (int l = 1, r; l <= x; l = r + 1) { r = min(x / (x / l), y / (y / l)); if (x / l < y / l) ++d[l], --d[r + 1]; } ++d[x + 1]; --d[y + 1]; } for (int i = 1; i <= n; ++i) { d[i] += d[i - 1]; cout << d[i] << "\n"; } return0; }