CF701B Cells Not Under Attack
Description
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 Format
The first line of the input contains two integers $ n $ and $ m $ ( $ 1
Output Format
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.
Explanation/Hint
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.
