#include<iostream>
using namespace std;
long long x[200000], n, q;
int main() {
cin >> n >> q; x[0] = 2000000000000;
if (n <= 100 && q <= 100) {
for (int i = 0; i < q; i++) {
long long a, b, t = 0;
cin >> a >> b;
bool flag = false;
for (int j = a; j >= 1; j--) {
if (j != 1)t += (x[j - 1] - x[j])*(a - j + 1);
if (t >= b || j == 1) {
if (j != 1) t -= (x[j - 1] - x[j])*(a - j + 1);
for (int k = j + 1; k <= a; k++)x[k] = x[j];
long long u = b - t;
long long v1 = u / (a - j + 1), v2 = u % (a - j + 1);
for (int k = j; k < j + v2; k++)x[k] += (v1 + 1);
for (int k = j + v2; k <= a; k++)x[k] += v1;
flag = true;
break;
}
}
}
}
else {
for (int i = 0; i < q; i++) {
long long a, b;
cin >> a >> b;
for (int j = 0; j < b; j++) {
int L = 1, R = a, M;
if (x[a] != x[a - 1]) { x[a]++; continue; }
if (x[a] == x[1]) { x[1]++; continue; }
while (true) {
M = (L + R) / 2;
if (x[a] == x[M] && x[a] != x[M - 1]) { x[M]++; break; }
if (x[a] == x[M - 1])R = M;
if (x[a] != x[M])L = M;
}
}
}
}
for (int i = 1; i <= n; i++)cout << x[i] << endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmxvbmcgbG9uZyB4WzIwMDAwMF0sIG4sIHE7CmludCBtYWluKCkgewoJY2luID4+IG4gPj4gcTsgeFswXSA9IDIwMDAwMDAwMDAwMDA7CglpZiAobiA8PSAxMDAgJiYgcSA8PSAxMDApIHsKCQlmb3IgKGludCBpID0gMDsgaSA8IHE7IGkrKykgewoJCQlsb25nIGxvbmcgYSwgYiwgdCA9IDA7CgkJCWNpbiA+PiBhID4+IGI7CgkJCWJvb2wgZmxhZyA9IGZhbHNlOwoJCQlmb3IgKGludCBqID0gYTsgaiA+PSAxOyBqLS0pIHsKCQkJCWlmIChqICE9IDEpdCArPSAoeFtqIC0gMV0gLSB4W2pdKSooYSAtIGogKyAxKTsK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