#include <bits/stdc++.h>
using namespace std;
int row[223456];
int col[223456];
int main() {
  int x, y;
  int k = 0, l = 0;
  cin >> x >> y;
  long long res = 1ll * x * x;
  ;
  while (y--) {
    int a, b;
    cin >> a >> b;
    if (!row[a]) {
      res -= x - l;
      row[a] = 1;
      k++;
    }
    if (!col[b]) {
      res -= x - k;
      col[b] = 1;
      l++;
    }
    cout << res << " ";
  }
  return 0;
}
