#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long ans;
  int x[100001], y[100001];
  for (int i = 0; i <= n; i++) {
    x[i] = 0;
    y[i] = 0;
  }
  long long a, b, v, g;
  v = 0;
  g = 0;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    if (x[a] == 0) v++;
    if (y[b] == 0) g++;
    x[a] = 1;
    y[b] = 1;
    ans = (n - v) * (n - g);
    cout << ans << endl;
  }
  return 0;
}
