#include <bits/stdc++.h>
using namespace std;
struct Node {
  int value, pos;
  bool operator<(const Node &tmp) const { return value < tmp.value; };
} node[200000];
int row[200000], col[200000];
int main(int argc, const char *argv[]) {
  long long n, m, sum;
  cin >> n >> m;
  sum = n * n;
  long long rowNum, colNum;
  rowNum = colNum = 0;
  while (m--) {
    int x, y;
    cin >> x >> y;
    if (!row[x]) {
      sum -= n - colNum;
    }
    if (!col[y]) {
      sum -= n - rowNum;
    }
    if (!row[x] && !col[y]) {
      ++sum;
    }
    if (!row[x]) {
      ++rowNum;
      row[x] = 1;
    }
    if (!col[y]) {
      ++colNum;
      col[y] = 1;
    }
    cout << sum << " ";
  }
  return 0;
}
