Vasya has the square chessboard of size n × n and m rooks. Initially the chessboard is empty. Vasya will consequently put the rooks on the board one after another.

The cell of the field is under rook's attack, if there is at least one rook located in the same row or in the same column with this cell. If there is a rook located in the cell, this cell is also under attack.

You are given the positions of the board where Vasya will put rooks. For each rook you have to determine the number of cells which are not under attack after Vasya puts it on the board.

Input

The first line of the input contains two integers n and m (1 ≤ n ≤ 100 000, 1 ≤ m ≤ min(100 000, n2)) — the size of the board and the number of rooks. 

Each of the next m lines contains integers xi and yi (1 ≤ xi, yi ≤ n) — the number of the row and the number of the column where Vasya will put the i-th rook. Vasya puts rooks on the board in the order they appear in the input. It is guaranteed that any cell will contain no more than one rook.

Output

Print m integer, the i-th of them should be equal to the number of cells that are not under attack after first i rooks are put.

Examples

Input

3 3
1 1
3 1
2 2


Output

4 2 0 


Input

5 2
1 5
5 1


Output

16 9 


Input

100000 1
300 400


Output

9999800001 

Note

On the picture below show the state of the board after put each of the three rooks. The cells which painted with grey color is not under the attack.

<image>
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
 
public class Main {
	public static void main(String[] args) {
		InputReader in = new InputReader();
		PrintWriter out = new PrintWriter(System.out);
		Thread th = new Thread(null, new Runnable(){public void run(){new Task1().solve(in, out);}},"Task1",1<<24);
		try{
			th.start();
			th.join();
		} catch(InterruptedException e){}
		out.close();
	}

	static class Task1{
		static final int MAX = 100001;

		public void solve(InputReader in, PrintWriter out){
			int n = in.nextInt(), m = in.nextInt();
			boolean[] x = new boolean[n+1], y = new boolean[n+1];
			long ans = (long)n*n, sizex = n, sizey = n;
			for(int i=0; i<m; i++){
				int a = in.nextInt(), b = in.nextInt();
				if(!x[a] && !y[b]){
					ans -= sizex+sizey-1;
					sizex--;
					sizey--;
				} else if(x[a] && y[b]){
					//
				} else if(x[a]){
					ans -= sizey;
					sizex--;
				} else if(y[b]){
					ans -= sizex;
					sizey--;
				}
				x[a] = y[b] = true;

				out.print(ans+" ");
			}
			out.println();
		}
		
		long gcd(long a, long b){
			while(a>0){
				long rem = b%a;
				b = a;
				a = rem;
			}
			return b;
		}
		long expo(long a, long b, long MOD){
			long result = 1;
			while (b>0){
				if (b%2==1) result=(result*a)%MOD;
				b>>=1;
				a=(a*a)%MOD;
			}
			return result%MOD;
		}
		long inverseModullo(long numerator, long denominator, long MOD){
			return ((numerator )*(expo(denominator, MOD-2, MOD))) ;
		}
	}
 	
	static class InputReader{
		final InputStream stream;
		final byte[] buf = new byte[8192];
		int curChar, numChars;
		SpaceCharFilter filter;
		public InputReader(){
			this.stream = System.in;
		}
		public int read(){
			if(numChars == -1) throw new InputMismatchException();
			if(curChar >= numChars){
				curChar = 0;
				try{
					numChars = stream.read(buf);
				} catch(IOException e){
					throw new InputMismatchException();
				}
				if(numChars <= 0) return -1;
			}
			return buf[curChar++];
		}
		public int nextInt(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			int sgn = 1;
			if(c == '-'){
				sgn = -1;
				c = read();
			}
			int res = 0;
			do{
				if(c<'0' || c>'9') throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while(!isSpaceChar(c));
			return res*sgn;
		}
		public long nextLong(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			int sgn = 1;
			if(c == '-'){
				sgn = -1;
				c = read();
			}
			long res = 0;
			do{
				if(c<'0' || c>'9') throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while(!isSpaceChar(c));
			return res*sgn;
		}
		public String next(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			StringBuilder res = new StringBuilder();
			do{
				res.appendCodePoint(c);
				c = read();
			}while(!isSpaceChar(c));
			return res.toString();
		}
		public boolean isSpaceChar(int c){
			if(filter != null) return filter.isSpaceChar(c);
			return c==' ' || c=='\n' || c=='\r' || c=='\t' || c==-1;
		}
		public interface SpaceCharFilter{
			public boolean isSpaceChar(int ch);
		}
	}
	static class SegmentTree{
		static Integer[] segTree;
		public SegmentTree(Integer[] input){
			int n=input.length;
			int size=(int)Math.ceil(Math.log(n)/Math.log(2));
			segTree=new Integer[pow(2,size+1)-1];
			buildSegmentTree(input, 0, n-1, 0);
		}

		void buildSegmentTree(Integer[] input, int lo, int hi, int pos){
			if(lo==hi){
				segTree[pos]=input[lo];
				return;
			}
			int mid=lo+(hi-lo)/2;
			buildSegmentTree(input, lo, mid, 2*pos+1);
			buildSegmentTree(input, mid+1, hi, 2*pos+2);
			segTree[pos]=Math.max(segTree[2*pos+1], segTree[2*pos+2]);
		}

		int rangeMaxQuery(int lo, int hi, int qlo, int qhi, int pos){
			if(qlo>hi || qhi<lo) return -1;
			else if(qlo<=lo && qhi>=hi) return segTree[pos];
			int mid=lo+(hi-lo)/2;
			return Math.max(
					rangeMaxQuery(lo, mid, qlo, qhi, 2*pos+1),
					rangeMaxQuery(mid+1, hi, qlo, qhi, 2*pos+2)
					);
		}

		void updateSegmentTree(int lo, int hi, int index, int value, int pos){
			if(lo==hi){
				segTree[pos]=value;
				return;
			}
			int mid=lo+(hi-lo)/2;
			if(index<=mid) updateSegmentTree(lo, mid, index, value, 2*pos+1);
			else updateSegmentTree(mid+1, hi, index, value, 2*pos+2);
			segTree[pos]=Math.max(segTree[2*pos+1], segTree[2*pos+2]);
		}

		private static int pow(int a, int b){
			int result = 1, MOD=Integer.MAX_VALUE;
			while (b>0){
				if (b%2==1) result=(result*a)%MOD;
				b>>=1;
				a=(a*a)%MOD;
			}
			return result%MOD;
		}
	}
}