#include<iostream>
using namespace std;
long long x[10000], n, q;
int main() {
cin >> n >> q; if (n > 100 || q > 100)return 0; x[0] = 2000000000000;
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--) {
t += (x[j - 1] - x[j])*(a - j + 1);
if (t >= b) {
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;
}
}
}
for (int i = 1; i <= n; i++)cout << x[i] << endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmxvbmcgbG9uZyB4WzEwMDAwXSwgbiwgcTsKaW50IG1haW4oKSB7CgljaW4gPj4gbiA+PiBxOyBpZiAobiA+IDEwMCB8fCBxID4gMTAwKXJldHVybiAwOyB4WzBdID0gMjAwMDAwMDAwMDAwMDsKCWZvciAoaW50IGkgPSAwOyBpIDwgcTsgaSsrKSB7CgkJbG9uZyBsb25nIGEsIGIsIHQgPSAwOwoJCWNpbiA+PiBhID4+IGI7CgkJYm9vbCBmbGFnID0gZmFsc2U7CgkJZm9yIChpbnQgaiA9IGE7IGogPj0gMTsgai0tKSB7CgkJCXQgKz0gKHhbaiAtIDFdIC0geFtqXSkqKGEgLSBqICsgMSk7CgkJCWlmICh0ID49IGIpIHsKCQkJCXQgLT0gKHhbaiAtIDFdIC0geFtqXSkqKGEgLSBqICsgMSk7CgkJCQlmb3IgKGludCBrID0gaiArIDE7IGsgPD0gYTsgaysrKXhba10gPSB4W2pdOwoJCQkJbG9uZyBsb25nIHUgPSBiIC0gdDsKCQkJCWxvbmcgbG9uZyB2MSA9IHUgLyAoYSAtIGogKyAxKSwgdjIgPSB1ICUgKGEgLSBqICsgMSk7CgkJCQlmb3IgKGludCBrID0gajsgayA8IGogKyB2MjsgaysrKXhba10gKz0gKHYxICsgMSk7CgkJCQlmb3IgKGludCBrID0gaiArIHYyOyBrIDw9IGE7IGsrKyl4W2tdICs9IHYxOwoJCQkJZmxhZyA9IHRydWU7CgkJCQlicmVhazsKCQkJfQoJCX0KCX0KCWZvciAoaW50IGkgPSAxOyBpIDw9IG47IGkrKyljb3V0IDw8IHhbaV0gPDwgZW5kbDsKCXJldHVybiAwOwp9