#include <bits/stdc++.h>
using namespace std;
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
signed main() {
  fast();
  long long n, m;
  cin >> n >> m;
  long long sum = n * n;
  vector<long long> row(n + 1), col(n + 1);
  long long X = n, Y = n;
  while (m--) {
    long long x, y;
    cin >> x >> y;
    if (!row[x]) {
      row[x] = 1;
      X--;
    }
    if (!col[y]) {
      col[y] = 1;
      Y--;
    }
    cout << X * Y << " ";
  }
  return 0;
}
