#include <bits/stdc++.h>
using namespace std;
int n, m, l, c;
long long r, ql, qc;
bool li[100100], col[100100];
int main() {
  scanf("%d%d", &n, &m);
  ql = qc = n;
  while (m--) {
    scanf("%d%d", &l, &c);
    if (!li[l]) li[l] = 1, ql--;
    if (!col[c]) col[c] = 1, qc--;
    r = ql * qc;
    printf("%I64d\n", r);
  }
  return 0;
}
