#include <iostream>
long RESET = 30001;
int cnt[20000006] = {0};
long n, m;
void solve1(int nums[], int l, int r, int s, int e)
{
int d = (e - s) / (r - l);
nums[l + RESET] += s;
nums[l + RESET + 1] += d - s;
nums[r + RESET + 1] -= (d + e);
nums[r + RESET + 2] += e;
}
void solve(int nums[], int l, int r, int s, int e, int d)
{
nums[l + RESET] += s;
nums[l + RESET + 1] += d - s;
nums[r + RESET + 1] -= (d + e);
nums[r + RESET + 2] += e;
}
int main()
{
std::cin >> n >> m;
while (n--)
{
int loc, v;
std::cin >> v >> loc;
solve(cnt, loc + 1, loc + 2 * v, -v + 1, v, 1);
solve(cnt, loc + 2 * v + 1, loc + 3 * v - 1, v - 1, 1, -1);
solve(cnt, loc - 3 * v + 1, loc - 2 * v, 1, v, 1);
solve(cnt, loc - 2 * v + 1, loc, v - 1, -v, -1);
// 警示后人,采用solve1会RE,我真服了int d = (e - s) / (r - l);这个很耗时间吗
}
for (int i = 1; i <= m + RESET; i++)
{
cnt[i] += cnt[i - 1];
}
for (int i = 1; i <= m + RESET; i++)
{
cnt[i] += cnt[i - 1];
}
for (int i = RESET + 1; i <= m + RESET; i++)
{
std::cout << cnt[i] << " ";
}
return 0;
}