#include <bits/stdc++.h>
using namespace std;
set<int> row, col;
int main() {
  int i, n, m, j, k;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> j >> k;
    row.insert(j);
    col.insert(k);
    long long t = (long long)(n - row.size()) * n - (long long)col.size() * n +
                  (long long)row.size() * col.size();
    cout << t << " ";
  }
  cout << endl;
  return 0;
}
