#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")

#define rd_init() char*rp=({char*mmap();mmap(0l,1l<<25,1,2,0,0ll);})
#define rd() ({int _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;})
#define wt(v) ({ulong _z=v;do*--wp=_z%10+48;while(_z/=10);})
#define rrep(v,e) for(typeof(e) v=e;v--;)

typedef unsigned long ulong;

char wbuf[1<<25];
long c[100000];

int main(){
	long n;
	long a=0;
	long b=0;
	{
		rd_init();
		n=rd();
		for(long m=rd();m--;){
			long p=rd()-1;
			long q=rd();
			if(p-q>=0){
				c[p-q]+=1;
			}
			c[p]+=-2;
			if(p+q<n){
				c[p+q]+=1;
			}else{
				b+=1;
				a+=p+q-n+1;
			}
		}
	}
	{
		char*wp=wbuf+sizeof wbuf;
		rrep(x,n){
			*--wp=' ';
			wt(a);
			a+=b+=c[x];
		}
		write(1,wp,wbuf+sizeof wbuf-wp);
	}
	_exit(0);
}