#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long n, m;
  cin >> n;
  cin >> m;
  long long temp1, temp2;
  long long countr = n, countc = n;
  long long a[n], b[n];
  for (int i = 0; i < n; i++) {
    a[i] = 1;
    b[i] = 1;
  }
  for (int i = 0; i < m; i++) {
    cin >> temp1 >> temp2;
    if (a[temp1 - 1] != 0) {
      a[temp1 - 1] = 0;
      countr--;
    }
    if (b[temp2 - 1] != 0) {
      b[temp2 - 1] = 0;
      countc--;
    }
    cout << (countr * countc) << " ";
  }
  return 0;
}
