#include using namespace std; int main(){ int N,M;cin >> N >> M; vector ans(N+2),S(N+2); auto add = [](vector &A,int l,int r,int C)->void{ A[l] += C; A[r] -= C; }; while(M--){ int p,q;cin >> p >> q; int a = q - p; add(ans,min(max(p-q+1,1),p),p,a); add(S,min(max(p-q+1,1),p),p,1); int b = p + q; add(ans,p,min(b+1,N+1),b); add(S,p,min(b+1,N+1),-1); } for(int i=1;i<=N;i++){ S[i+1] += S[i]; ans[i+1] += ans[i]; cout << ans[i] + S[i] * i << " "; } cout<