#include <bits/stdc++.h>
using namespace std;
long long n, m, cells[100005], xcnt, ycnt, x[100005], y[100005], aux;
int main() {
  scanf("%I64d%I64d", &n, &m);
  xcnt = n;
  ycnt = n;
  for (int i = 1; i <= m; i++) {
    int xCord, yCord;
    scanf("%d%d", &xCord, &yCord);
    if (!x[xCord]) {
      x[xCord] = 1;
      xcnt--;
    }
    if (!y[yCord]) {
      y[yCord] = 1;
      ycnt--;
    }
    cells[i] = xcnt * ycnt;
    aux = xcnt * ycnt;
  }
  for (int i = 1; i <= m; i++) {
    printf("%I64d ", cells[i]);
  }
  return 0;
}
