#include <bits/stdc++.h>
using namespace std;
bool r[100010], c[100010];
int main() {
  ios_base::sync_with_stdio(false);
  long long n, m, a, b, li, co;
  cin >> n >> m;
  li = co = 0;
  long long ans;
  for (int i = 0; i < m; i++) {
    cin >> a >> b;
    if (r[a] == false) {
      r[a] = true;
      li++;
    }
    if (c[b] == false) {
      c[b] = true;
      co++;
    }
    ans = n * n - co * n;
    ans = ans - li * (n - co);
    if (i > 0) cout << " ";
    cout << ans;
  }
  cout << endl;
  return 0;
}
