#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  long long n, m;
  cin >> n >> m;
  set<int> r, c;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    r.insert(x);
    c.insert(y);
    unsigned long long rem = 0;
    long long s1 = r.size(), s2 = c.size();
    rem = (long long)(n * n) - (long long)(s1 + s2) * n + (long long)s1 * s2;
    cout << rem << " ";
  }
  return 0;
}
