#include <bits/stdc++.h>
using namespace std;
int m, n, x, y;
int flagX[100005], flagY[100005];
int main() {
  ios_base::sync_with_stdio(0);
  memset(flagX, 0, sizeof(flagX));
  memset(flagY, 0, sizeof(flagY));
  long long res = 0;
  int damagedX = 0, damagedY = 0;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    if (!flagX[x]) damagedX++, flagX[x] = 1;
    if (!flagY[y]) damagedY++, flagY[y] = 1;
    cout << 1LL * n * n - 1LL * n * (damagedY + damagedX) +
                1LL * damagedX * damagedY
         << " ";
  }
  return 0;
}
