#include <bits/stdc++.h>
using namespace std;
int row[100005], col[100005];
long long l_row, l_col;
int main() {
  int n, m, r, c;
  cin >> n >> m;
  long long tot = n * n;
  l_row = l_col = n;
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &r, &c);
    if (row[r] != 1 && l_row > 0) {
      l_row--;
    }
    if (col[c] != 1 && l_col > 0) {
      l_col--;
    }
    row[r] = 1;
    col[c] = 1;
    long long ans = l_row * l_col;
    cout << ans << " ";
  }
  return 0;
}
