#include <bits/stdc++.h>
using namespace std;
bool flagx[100010];
bool flagy[100010];
int main() {
  int n, m;
  int x, y;
  cin >> n >> m;
  long long cntx = n, cnty = n;
  memset(flagx, 0, sizeof flagx);
  memset(flagy, 0, sizeof flagy);
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    if (!flagx[x]) flagx[x] = 1, cntx--;
    if (!flagy[y]) flagy[y] = 1, cnty--;
    if (i) cout << ' ';
    cout << cntx * 1L * cnty;
  }
  return 0;
}
