#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, m, cntx, cnty, x, y;
bool visx[N], visy[N];
int main() {
  scanf("%d%d", &n, &m);
  long long ans = 1ll * n * n;
  cntx = n;
  cnty = n;
  while (m--) {
    scanf("%d%d", &x, &y);
    bool flag = 0;
    if (!visx[x]) {
      cntx--;
      ans -= cnty;
      visx[x] = 1;
    }
    if (!visy[y]) {
      cnty--;
      ans -= cntx;
      visy[y] = 1;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
