#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long int i, n, m, val, b[100000][2], a[100000], c[100000],
      count, c1;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> b[i][0] >> b[i][1];
  }
  for (i = 0; i < n; i++) {
    a[i] = i + 1;
    c[i] = i + 1;
  }
  count = 0;
  c1 = 0;
  for (i = 0; i < m; i++) {
    val = b[i][0] - 1;
    if (a[val] != -1) {
      a[val] = -1;
      count++;
    }
    val = b[i][1] - 1;
    if (c[val] != -1) {
      c[val] = -1;
      c1++;
    }
    val = (n - count) * (n - c1);
    cout << val << " ";
  }
  return 0;
}
