#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005];
void resolve() {
  long long int n, m;
  cin >> n >> m;
  vector<long long int> e(m);
  int r = 0, c = 0;
  for (int i = 0; i < m; i++) {
    long long int x, y;
    cin >> x >> y;
    if (!a[x]) {
      r++;
      a[x] = 1;
    }
    if (!b[y]) {
      c++;
      b[y] = 1;
    }
    e[i] = (n - r) * (n - c);
  }
  for (int i = 0; i < m; i++) cout << e[i] << " ";
}
int main() {
  int t;
  t = 1;
  while (t--) {
    resolve();
  }
}
