N,M=map(int,input().split()) imos=[0]*(N+1) for m in range(M): r,l=map(int,input().split()) l-=1 imos[l]+=1 imos[r]-=1 for i in range(1,N+1): imos[i]+=imos[i-1] for i in range(N-1,-1,-1): ans=imos[i] print(ans)