Pizza Party Planning

You're hosting a festive pizza party with NN friends seated around a circular table, numbered from 00 to N1N-1 in clockwise order. You plan to order QQ pizzas over the course of the event. The ii-th pizza is cut into aia_i slices and the very first slice is handed to friend bib_i. Thereafter, each subsequent slice is passed one seat to the right (clockwise), so that slice number jj goes to friend (bi+j)modN(b_i + j) \bmod N.

Your task is to calculate, after all QQ pizzas have been fully distributed, the total number of slices each friend has eaten.

Input

The first line contains two integers NN and QQ.

Each of the next QQ lines contains two integers aia_i and bib_i, describing the ii-th pizza.

Output

Print NN integers: the total slices received by friend 00, friend 11, ... , friend N1N-1, in order, separated by spaces.

Constraints

  • 1N,Q21051 \le N, Q \le 2\cdot 10^5