#include <bits/stdc++.h>
using namespace std;
int r[100005];
int c[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  long long cur = 1ll * n * n;
  int rcnt = 0;
  int ccnt = 0;
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    if (!r[x]) {
      cur -= (n - ccnt);
      r[x] = 1;
      rcnt++;
    }
    if (!c[y]) {
      cur -= (n - rcnt);
      c[y] = 1;
      ccnt++;
    }
    cout << cur << ' ';
  }
}
