#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int row[n + 1], col[n + 1];
  long long int cntx = n, cnty = n;
  memset(row, 0, sizeof(row));
  memset(col, 0, sizeof(col));
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    if (row[x] == 0) {
      row[x] = 1;
      cntx--;
    }
    if (col[y] == 0) {
      col[y] = 1;
      cnty--;
    }
    cout << cntx * cnty << " ";
  }
}
