#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <bitset>
using namespace std;

typedef pair<int, int> P;
typedef pair<P, long long> P2;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define index(xs, x) (int)(lower_bound(all(xs), x) - xs.begin())
#define _1 first
#define _2 second
#define pb push_back
#define INF (1LL<<60)
#define MOD 1000000007

int N, Q;
long long A[100000];
signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  cin >> N >> Q;
  set<P2> S;
  S.insert(P2(P(0, N-1), 0));
  rep(i, Q) {
    int a;
    long long b;
    cin >> a >> b;
    a--;
    auto it = --S.upper_bound(P2(P(a+1, -1), -1));
    P2 p = *it;
    if (p._1._2 > a) {
      S.erase(it);
      S.insert(P2(P(a+1, p._1._2), p._2));
      it = S.insert(P2(P(p._1._1, a), p._2))._1;
    }
    while (true) {
      P2 cur = *it;
      long long w = cur._1._2-cur._1._1+1;
      long long lim = INF;
      if (it != S.begin()) {
        lim = (--it)->_2 - cur._2;
        it++;
      }
      long long up = min(lim, b/w);
      cur._2 += up;
      b -= 1LL*up*w;
      if (it != S.begin() && up == lim) {
        it = S.erase(it);
        int left = (--it)->_1._1;
        S.erase(it);
        it = S.insert(P2(P(left, a), cur._2))._1;
      }
      else {
        S.erase(it);
        it = S.insert(cur)._1;
        break;
      }
    }
    if (b > 0) {
      P2 cur = *it;
      int left = it->_1._1, border = left+b;
      S.erase(it);
      S.insert(P2(P(left, border-1), cur._2+1));
      S.insert(P2(P(border, a), cur._2));
    }
  }
  for (P2 p : S) {
    int l = p._1._1, r = p._1._2;
    long long val = p._2;
    for (int i=l; i<=r; i++) A[i] = val;
  }
  rep(i, N) cout << A[i] << "\n";
  return 0;
}
