#include<bits/stdc++.h>

using namespace std;
// 寿司を食べたい！！
typedef long long int64;

struct SegmentTree
{
  vector< int64 > seg, lazy;
  int sz;

  SegmentTree(int n)
  {
    sz = 1;
    while(sz < n) sz <<= 1;
    seg.assign(2 * sz - 1, 0);
    lazy.assign(2 * sz - 1, -1);
  }

  void push(int k)
  {
    if(lazy[k] >= 0) {
      if(k < sz - 1) {
        lazy[2 * k + 1] = lazy[k] >> 1LL;
        lazy[2 * k + 2] = lazy[k] >> 1LL;
      }
      seg[k] = lazy[k];
      lazy[k] = -1;
    }
  }

  int64 query(int a, int b, int k, int l, int r)
  {
    push(k);
    if(a >= r || b <= l) {
      return (0);
    } else if(a <= l && r <= b) {
      return (seg[k]);
    } else {
      return (query(a, b, 2 * k + 1, l, (l + r) >> 1) +
              query(a, b, 2 * k + 2, (l + r) >> 1, r));
    }
  }

  int64 query(int a, int b)
  {
    return (query(a, b, 0, 0, sz));
  }

  void update(int a, int b, int64 x, int k, int l, int r)
  {
    push(k);
    if(a >= r || b <= l) {
      return;
    } else if(a <= l && r <= b) {
      lazy[k] = x * (r - l);
      push(k);
    } else {
      update(a, b, x, 2 * k + 1, l, (l + r) >> 1);
      update(a, b, x, 2 * k + 2, (l + r) >> 1, r);
      seg[k] = seg[2 * k + 1] + seg[2 * k + 2];
    }
  }

  void update(int a, int b, int64 x)
  {
    update(a, b, x, 0, 0, sz);
  }

};

signed main()
{
  int N, Q;

  cin >> N >> Q;
  SegmentTree tree(N);
  while(Q--) {
    int64 A, B;
    cin >> A >> B;
    int low = 0, high = A;
    while(high - low > 1) {
      int mid = (low + high) >> 1;
      if(tree.query(mid, mid + 1) * (A - mid) - tree.query(mid, A) > B) low = mid;
      else high = mid;
    }
    if(tree.query(low, low + 1) * (A - low) - tree.query(low, A) > B) ++low;
    int64 v = tree.query(low, A) + B;
    int64 width = A - low;
    tree.update(low, A, v / width + 1);
    tree.update(low + v % width, A, v / width);
  }
  for(int i = 0; i < N; i++) {
    cout << tree.query(i, i + 1) << endl;
  }
}
