#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<long long> output;
  vector<bool> vcol(n, false), vrow(n, false);
  int col = n, row = n;
  while (m--) {
    int x, y;
    cin >> x >> y;
    --x, --y;
    if (!vcol[x]) {
      vcol[x] = true;
      --col;
    }
    if (!vrow[y]) {
      vrow[y] = true;
      --row;
    }
    output.push_back(1ll * col * row);
  }
  for (int i = 0; i < output.size(); ++i) cout << output[i] << ' ';
}
