Input

The input is given from Standard Input in the following format:


> $N \ Q$ $a_1 \ b_1$ $a_2 \ b_2$ $ ： \ ： $ $a_Q \ b_Q$

Output

* You have to print $N$ lines.
* The $i$-th line should contain the number of dishes of sushi had eaten for customer $i (1 \le i \le N)$.



Constraints

* $3 \le N, Q \le 100,000$
* $1 \le a_i \le N$
* $1 \le b_i \le 10^{12}$
* Any final results do not exceed $2 \times 10^{13}$.



Subtasks

Subtask 1 [ $60$ points ]


* $N, Q \le 100$
* $b_i = 1$

Subtask 2 [ $400$ points ]


* $N, Q \le 100$
* $b_i \le 10^{12}$

Subtask 3 [ $240$ points ]


* $N, Q \le 100,000$
* $b_i = 1$

Subtask 4 [ $500$ points ]


* There are no additional constraints.

Output

* You have to print $N$ lines.
* The $i$-th line should contain the number of dishes of sushi had eaten for customer $i (1 \le i \le N)$.



Constraints

* $3 \le N, Q \le 100,000$
* $1 \le a_i \le N$
* $1 \le b_i \le 10^{12}$
* Any final results do not exceed $2 \times 10^{13}$.



Subtasks

Subtask 1 [ $60$ points ]


* $N, Q \le 100$
* $b_i = 1$

Subtask 2 [ $400$ points ]


* $N, Q \le 100$
* $b_i \le 10^{12}$

Subtask 3 [ $240$ points ]


* $N, Q \le 100,000$
* $b_i = 1$

Subtask 4 [ $500$ points ]


* There are no additional constraints.

Input

The input is given from Standard Input in the following format:


> $N \ Q$ $a_1 \ b_1$ $a_2 \ b_2$ $ ： \ ： $ $a_Q \ b_Q$

Examples

Input

9 3
5 11
8 4
4 7


Output

4
4
4
4
2
2
1
1
0


Input

6 6
3 5
6 11
1 6
4 7
5 2
2 5


Output

10
10
5
5
4
2


Input

5 6
1 1
2 1
3 1
1 1
5 1
3 1


Output

2
2
1
1
0


Input

10 10
10 10
9 20
8 30
7 40
6 50
5 60
4 70
3 80
2 90
1 100


Output

223
123
77
50
33
21
12
7
3
1
//It is made by ljh2000
//有志者，事竟成，破釜沉舟，百二秦关终属楚；苦心人，天不负，卧薪尝胆，三千越甲可吞吴。
#include <algorithm>
#include <iostream>
#include <cstring>
#include <vector>
#include <cstdio>
#include <string>
#include <queue>
#include <cmath>
#include <ctime>
#define lc root<<1
#define rc root<<1|1
using namespace std;
typedef long long LL;
const int MAXN = 200011;
int n,Q;
struct node{ LL set,add,sum; }a[MAXN*3];
inline void update(int root){ a[root].sum=a[lc].sum+a[rc].sum; }
inline int getint(){
    int w=0,q=0; char c=getchar(); while((c<'0'||c>'9') && c!='-') c=getchar();
    if(c=='-') q=1,c=getchar(); while (c>='0'&&c<='9') w=w*10+c-'0',c=getchar(); return q?-w:w;
}

inline void pushdown(int root,int l,int r){
	if(a[root].set==0 && a[root].add==0) return  ; if(l==r) return ;
	int mid=(l+r)>>1;
	if(a[root].set>0) {
		a[lc].set=a[rc].set=a[root].set;
		a[lc].sum=1LL*a[root].set*(mid-l+1); a[rc].sum=1LL*a[root].set*(r-mid);
		a[lc].add=a[rc].add=a[root].set=0;
	}

	if(a[root].add>0) {
		a[lc].add+=a[root].add; a[rc].add+=a[root].add;
		a[lc].sum+=1LL*a[root].add*(mid-l+1); a[rc].sum+=1LL*a[root].add*(r-mid);
		a[root].add=0;
	}
}

inline void modify(int root,int l,int r,int ql,int qr,LL val){
	pushdown(root,l,r);
	if(ql<=l && r<=qr) {
		a[root].set=val; a[root].add=0;
		a[root].sum=1LL*(r-l+1)*val;
		return ;
	}
	int mid=(l+r)>>1;
	if(ql<=mid) modify(lc,l,mid,ql,qr,val);
	if(qr>mid) modify(rc,mid+1,r,ql,qr,val);
	update(root);
}

inline void add(int root,int l,int r,int ql,int qr,LL val){
	pushdown(root,l,r);
	if(ql<=l && r<=qr) {
		a[root].sum+=1LL*val*(r-l+1);
		a[root].add+=val;
		return ;
	}
	int mid=(l+r)>>1;
	if(ql<=mid) add(lc,l,mid,ql,qr,val);
	if(qr>mid) add(rc,mid+1,r,ql,qr,val);
	update(root);
}

inline LL query(int root,int l,int r,int ql,int qr){
	if(ql<=l && r<=qr) return a[root].sum;
	pushdown(root,l,r); int mid=(l+r)>>1;
	if(qr<=mid) return query(lc,l,mid,ql,qr);
	else if(ql>mid) return query(rc,mid+1,r,ql,qr);
	return query(lc,l,mid,ql,qr)+query(rc,mid+1,r,ql,qr);
}

inline void dfs(int root,int l,int r){
	if(l==r) { printf("%lld\n",a[root].sum); return ; }
	pushdown(root,l,r); int mid=(l+r)>>1;
	dfs(lc,l,mid); dfs(rc,mid+1,r);
}

inline void work(){
	n=getint(); Q=getint(); int x; LL y; int l,r,mid,pos;
	while(Q--) {
		x=getint(); scanf("%lld",&y);
		if(x==1) { add(1,1,n,1,1,y); continue; }
		l=1; r=x; pos=0;
		while(l<=r) {
			mid=(l+r)>>1;
			if(1LL*query(1,1,n,mid,mid)*(x-mid+1)-query(1,1,n,mid,x) <= y) r=mid-1;
			else l=mid+1,pos=mid;
		}
		y-=1LL*query(1,1,n,pos+1,pos+1)*(x-pos)-query(1,1,n,pos+1,x);
		modify(1,1,n,pos+1,x, query(1,1,n,pos+1,pos+1) );
		if(y/(x-pos)) add(1,1,n,pos+1,x,y/(x-pos));
		if(y%(x-pos)) add(1,1,n,pos+1,pos+y%(x-pos),1);
	}
	dfs(1,1,n);
}

int main()
{
    work();
    return 0;
}
//有志者，事竟成，破釜沉舟，百二秦关终属楚；苦心人，天不负，卧薪尝胆，三千越甲可吞吴。
