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