#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
#include <set>

using namespace std;
using ll = long long;
using ull = unsigned long long;
constexpr ll TEN(int n) { return (n==0) ? 1 : 10*TEN(n-1); }

int main() {
    ios::sync_with_stdio(0);
    int n, q;
    cin >> n >> q;
    //cout << n << " " << q << endl;
    using P = pair<int, ll>;
    set<P> s;
    s.insert(P(-1, 3*TEN(13)));
    s.insert(P(n-1, 0));

    for (int i = 0; i < q; i++) {
        int a; ll b;
        cin >> a >> b; a--;
        while (b) {
            auto it = s.lower_bound(P(a, -1));
            auto pr = *it; it--;
            auto pl = *it;
            int d = a-pl.first;
            if (a == pr.first) s.erase(pr);
            if (d*(pl.second-pr.second) <= b) {
                s.erase(pl); 
                s.insert(P(a, pl.second));
                b -= d*(pl.second-pr.second);
            } else {                
                s.insert(P(a, pr.second + b/d));
                if (b%d) {
                    s.insert(P(pl.first + b%d, pr.second + b/d + 1));
                }
                if (pr.second + (b+d-1)/d == pl.second) {
                    s.erase(pl);
                }
                b = 0;
            }
        }
    }

    ll res[n];
    int b = -1;
    for (auto p: s) {
        for (int i = b+1; i <= p.first; i++) {
            res[i] = p.second;
        }
        b = p.first;
    }

    for (int i = 0; i < n; i++) {
        cout << res[i] << endl;
    }
    return 0;
}

