#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long m) {
  long long ret = 1;
  while (b) {
    if (b % 2) ret = ((ret % m) * (a % m)) % m;
    a = ((a % m) * (a % m)) % m;
    b /= 2;
  }
  return ret;
}
int main() {
  long long n, m;
  cin >> n >> m;
  bool row[n], col[n];
  memset(row, false, sizeof(row));
  memset(col, false, sizeof(col));
  long long x, y;
  x = y = n;
  while (m--) {
    int p, q;
    cin >> p >> q;
    p--;
    q--;
    if (!row[p]) {
      row[p] = true;
      x--;
    }
    if (!col[q]) {
      col[q] = true;
      y--;
    }
    cout << x * y << endl;
  }
  return 0;
}
