#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
long long n, m;
bool row[maxn], col[maxn];
int crow, ccol;
long long ans;
int main() {
  scanf("%lld%lld", &n, &m);
  ans = n * n;
  for (int i = 0, x, y; i < m; i++) {
    scanf("%d%d", &x, &y);
    ans -= ((n - ccol) * (!row[x]) + (n - crow) * (!col[y])) -
           ((!row[x]) * (!col[y]));
    printf("%lld%c", ans, " \n"[i == m - 1]);
    if (!row[x]) {
      row[x] = true;
      crow++;
    }
    if (!col[y]) {
      col[y] = true;
      ccol++;
    }
  }
  return 0;
}
