#include <bits/stdc++.h>
using namespace std;
bool row[100000];
bool col[100000];
long long int ans[100000];
int main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  long long int n, m;
  long long int row_count = 0, col_count = 0;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    if (!row[x]) {
      row[x] = true;
      row_count++;
    }
    if (!col[y]) {
      col[y] = true;
      col_count++;
    }
    ans[i] = (n - row_count) * (n - col_count);
  }
  for (int i = 0; i < m; ++i) {
    cout << ans[i];
    if (i == m - 1)
      cout << '\n';
    else
      cout << " ";
  }
  return 0;
}
