#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int N = 100000 + 10;
bool c[N], r[N];
int main() {
  long long n, m;
  scanf("%I64d%I64d", &n, &m);
  memset(c, false, sizeof(c));
  memset(r, false, sizeof(r));
  long long all = n * n;
  int flag = 0, ctol = 0, rtol = 0;
  while (m--) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (!c[x]) {
      all -= (n - rtol);
      ctol++;
      c[x] = true;
    }
    if (!r[y]) {
      all -= (n - ctol);
      rtol++;
      r[y] = true;
    }
    if (flag) printf(" ");
    printf("%I64d", all);
    flag = 1;
  }
  return 0;
}
