import sys input = sys.stdin.readline N,M=map(int,input().split()) ANS=[0]*N LIST=[[] for i in range(N)] LIST2=[[] for i in range(N)] for i in range(M): p,q=map(int,input().split()) p-=1 LIST[p].append((q,1)) if p+q=0: LIST2[p-q].append((0,-1)) ANS[p]+=q NOW,count=0,0 for i in range(N): NOW-=count ANS[i]+=NOW for p,c in LIST[i]: NOW+=p count+=c NOW,count=0,0 for i in range(N-1,-1,-1): NOW-=count ANS[i]+=NOW for p,c in LIST2[i]: NOW+=p count+=c print(*ANS)