#include <bits/stdc++.h>
using namespace std;
int dong[100008], cot[100008], x, y, top_cot = 0, top_dong = 0, k;
long long m[100008], n;
int main() {
  cin >> n >> k;
  memset(dong, 0, sizeof(dong));
  memset(cot, 0, sizeof(cot));
  m[0] = n * n;
  for (int i = 1; i <= k; i++) {
    cin >> x >> y;
    if (dong[x] == 0) {
      dong[x] = 1;
      top_dong++;
    }
    if (cot[y] == 0) {
      cot[y] = 1;
      top_cot++;
    }
    m[i] = (n - top_dong) * (n - top_cot);
    cout << m[i] << " ";
  }
  return 0;
}
