#include <bits/stdc++.h>
using namespace std;
long long int box, n, m, r, c, s;
map<long long int, long long int> mpr;
map<long long int, long long int> mpc;
int main() {
  cin >> s >> n;
  box = s * s;
  for (long long int i = 0; i < n; i++) {
    cin >> r >> c;
    if (mpr[r] == 0) {
      mpr[r] = 1;
    }
    if (mpc[c] == 0) {
      mpc[c] = 1;
    }
    long long int remr = s - (mpr.size());
    long long int remc = s - (mpc.size());
    cout << remr * remc << "\n";
  }
  return 0;
}
