#include <bits/stdc++.h>
using namespace std;
bool x[1000006], y[1000005];
int main() {
  long long n, k;
  cin >> n >> k;
  long long r = n * n;
  long long yy = n, xx = n;
  for (int i = 0; i < k; i++) {
    long long a, b;
    cin >> a >> b;
    if (!y[a] && !x[b]) {
      r -= xx + yy;
      r++;
      xx--;
      yy--;
    } else if (!y[a]) {
      xx--;
      r -= yy;
    } else if (!x[b]) {
      yy--;
      r -= xx;
    }
    y[a] = 1;
    x[b] = 1;
    cout << r << endl;
  }
  return 0;
}
