#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, m, a, b;
set<int> sa;
set<int> sb;
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> a >> b;
    sa.insert(a);
    sb.insert(b);
    cout << (long long)(n - sa.size()) * (long long)(n - sb.size()) << endl;
  }
  return 0;
}
