class Imos_1: def __init__(self, N): """ 区間 0<=tuntil: break if dic[t]==0: continue if t_old<=t-1: Y.append((S, t_old,t-1)) S+=dic[t] t_old=t if t_old<=until: Y.append((S, t_old,until)) return Y #================================================== def solve(): N,M=map(int,input().split()) I=Imos_1(N+1) for _ in range(M): L,R=map(int,input().split()) I.add(R,L) J=I.cumulative_sum() return J[1:N+1][::-1] #================================================== import sys input=sys.stdin.readline write=sys.stdout.write write("\n".join(map(str,solve())))