#include <bits/stdc++.h>
using namespace std;
const double PI = 4 * atan(1.0);
const int MAXN = (int)(100010);
const int INF = (int)1E9 + 10;
const int MOD = (int)(1001017);
bool col[MAXN], row[MAXN];
int main() {
  long long n, m;
  cin >> n >> m;
  long long tot = n * n;
  long long cntR = 0, cntC = 0;
  for (int i = 0; i < m; i++) {
    int x, y, mins = 0;
    scanf("%d %d", &x, &y);
    if (!row[x] && !col[y]) {
      row[x] = 1;
      col[y] = 1;
      mins = n + n - 1 - cntR - cntC;
      cntR++;
      cntC++;
    } else if (row[x] && !col[y]) {
      col[y] = 1;
      mins = n - cntR;
      cntC++;
    } else if (!row[x] && col[y]) {
      row[x] = 1;
      mins = n - cntC;
      cntR++;
    }
    tot -= mins;
    printf("%lld ", tot);
  }
  return 0;
}
