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