#include <bits/stdc++.h>
using namespace std;
int main() {
  set<long long> rows;
  set<long long> cols;
  long long m, n;
  cin >> n >> m;
  for (long long i = 0; i < n; ++i) {
    rows.insert(i + 1);
    cols.insert(i + 1);
  }
  for (long long i = 0; i < m; ++i) {
    long long x, y;
    cin >> x >> y;
    rows.erase(x);
    cols.erase(y);
    cout << (long long)rows.size() * cols.size() << " ";
  }
  return 0;
}
