#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, coorx, coory, count, ans = 0;
  cin >> n >> m;
  set<int> x;
  set<int> y;
  long long int total = n * n;
  long long int rook[m];
  for (int i = 0; i < m; i++) {
    cin >> coorx >> coory;
    if (x.count(coorx) == 0 && y.count(coory) == 0) {
      count = (2 * n - 1);
    } else if (x.count(coorx) == 1 && y.count(coory) == 0) {
      count = n;
    } else if (x.count(coorx) == 0 && y.count(coory) == 1) {
      count = n;
    } else {
      count = 0;
    }
    if (x.count(coorx) == 0 && y.count(coory) == 0) {
      count -= x.size();
      x.insert(coorx);
      count -= y.size();
      y.insert(coory);
    } else if (x.count(coorx) == 1 && y.count(coory) == 0) {
      count -= x.size();
      y.insert(coory);
    } else if (x.count(coorx) == 0 && y.count(coory) == 1) {
      count -= y.size();
      x.insert(coorx);
    }
    ans += count;
    cout << total - ans << " ";
  }
}
