#include <bits/stdc++.h>

using namespace std;

const int N = 1e5 + 100;

void enter()
{
    freopen("solve.inp","r",stdin);
    freopen("solve.out","w",stdout);
}
const long long oo = 1e18;
long long IT[N * 4];
long long lazy[N * 4];

void cn(int i, int L, int R) {
    if (lazy[i] == 0) return;
    IT[i] = 1LL * (R - L + 1) * lazy[i];
    if (L != R) {
        lazy[i << 1] = lazy[i];
        lazy[i << 1 | 1] = lazy[i];
    }
    lazy[i] = 0;
}
void update(int i, int L, int R, int u, int v, long long val) { ///a[u -> v] = val
    cn(i, L, R);
    if (L > v || R < u) return;
    if (L >= u && R <= v) {
        lazy[i] = val;
        cn(i, L, R);
        return;
    }
    int mid = (L + R) >> 1;
    update(i << 1, L, mid, u, v, val);
    update(i << 1 | 1, mid + 1, R, u, v, val);
    IT[i] = IT[i << 1] + IT[i << 1 | 1];
}
long long Get(int i, int L, int R, int u, int v) {
    cn(i, L, R);
    if (L > v || R < u) return 0;
    if (L >= u && R <= v) return IT[i];
    int mid = (L + R) >> 1;
    long long Left = Get(i << 1, L, mid, u, v);
    long long Right = Get(i << 1 | 1, mid + 1, R, u, v);
    return Left + Right;
}
void solve()
{
    int n, Q;
    cin >> n >> Q;
    while (Q--) {
        int r;
      	long long Pi;
        cin >> r >> Pi;
        int L = 1;
        int R = r;
        int H = r;
        while (L <= R) {
            int mid = (L + R) >> 1;
            long long KC = Get(1, 1, n, mid, r);
            long long Cao = Get(1, 1, n, mid, mid);
            if ((Cao * (r - mid + 1) - KC) <= Pi) {
                R = mid - 1;
                H = mid;
            }
            else L = mid + 1;
        }
        long long Cao = Get(1, 1, n, H, H);
        long long SL = Get(1, 1, n, H, r);
        Pi -= Cao * (r - H + 1) - SL;
        long long newH = Cao + (Pi / (r - H + 1));
        long long Thua = Pi % (r - H + 1);
        update(1, 1, n, H, r, newH);
        update(1, 1, n, H, H + Thua - 1, newH + 1);
        //cout << Get(1, 1, n, 2, 2).sum << '\n';
//        for (int i = 1; i <= n; i++) cout << Get(1, 1, n, i, i).sum << ' ';
//        cout << '\n';
    }
    for (int i = 1; i <= n; i++) cout << Get(1, 1, n, i, i) << '\n';
}
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(nullptr); cout.tie(nullptr);
    //enter();
    solve();
}
