#include <bits/stdc++.h>
using namespace std;
char r[100010];
char c[100010];
int main() {
  long long n, m;
  cin >> n >> m;
  long long ft = n, sd = n;
  for (int i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    if (r[x] == 0) {
      r[x] = 1;
      ft -= 1;
    }
    if (c[y] == 0) {
      c[y] = 1;
      sd -= 1;
    }
    cout << ft * sd << " ";
  }
}
