#include <bits/stdc++.h>
using namespace std;
long long n, m, cnt, rowCnt, colCnt;
bool row[100005], col[100005];
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  cnt = n * n;
  for (int i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    if (!row[x] && !col[y]) {
      cnt -= (n + n - 1) - rowCnt - colCnt;
      rowCnt++;
      colCnt++;
      row[x] = 1;
      col[y] = 1;
    } else if (!row[x] && col[y]) {
      cnt -= n - colCnt;
      rowCnt++;
      row[x] = 1;
      col[y] = 1;
    } else if (row[x] && !col[y]) {
      cnt -= n - rowCnt;
      colCnt++;
      row[x] = 1;
      col[y] = 1;
    }
    cout << cnt << endl;
  }
  return 0;
}
