N, M = map(int, input().split()) LR = [list(map(int, input().split())) for _ in range(M)] C = [0 for _ in range(N+1)] for l, r in LR: C[N-l+1]+=1 if N-r+2<=N: C[N-r+2]-=1 S = [0] for i in range(1, N+1): S.append(S[-1]+C[i]) for i in range(1, N+1): print(S[i])