# "pypy" # import pypyjit;pypyjit.set_param("max_unroll_recursion=-1") import sys # from bisect import * # from collections import * # from decimal import * # PyPyだと遅い # from heapq import * # from itertools import * # from math import gcd, lcm # from random import * # from string import * # from atcoder.dsu import * # from atcoder.segtree import * # from more_itertools import * # from sortedcontainers import * # sys.setrecursionlimit(10**7) # PyPyは呪文を付ける # sys.set_int_max_str_digits(0) INF = 1 << 61 MOD = 998244353 # MOD = 10**9 + 7 IS_DEBUG = "LOCAL_DEBUG" in sys.argv File = sys.stdin def debug(*args, **kwargs): if IS_DEBUG: print(*["\033[31m" + str(i) + "\033[0m" for i in args], **kwargs) def input(): return File.readline().replace("\n", "") # /////////////////////////////////////////////////////////////////////////// # N = int(input()) N, M = map(int, input().split()) pq = [list(map(int, input().split())) for _ in range(M)] class Imos: def __init__(self, N): self.N = N self.A = [0] * (N + 2) def add(self, l, r, a, d): self.A[l] += a self.A[l + 1] += d - a self.A[r] -= d * (r - l) + a self.A[r + 1] += d * (r - l - 1) + a def get_all(self): ret = [0] * self.N ret[0] = self.A[0] for i in range(self.N - 1): ret[i + 1] = ret[i] + self.A[i + 1] for i in range(self.N - 1): ret[i + 1] += ret[i] return ret imos = Imos(N + 1) for p, q in pq: if p >= q: l = p - q + 1 r = p + 1 a = 1 d = 1 imos.add(l, r, a, d) l = p + 1 r = min(N + 1, p + q) a = q - 1 d = -1 imos.add(l, r, a, d) else: l = 1 r = p + 1 a = q - p + 1 d = 1 imos.add(l, r, a, d) l = p + 1 r = min(N + 1, p + q) a = q - 1 d = -1 imos.add(l, r, a, d) ans = imos.get_all() print(*ans[1:])