#include <bits/stdc++.h>
using namespace std;
int h[100005];
int l[100005];
int main() {
  int n, m;
  cin >> n >> m;
  long long row = n, co = n;
  for (int i = 1; i <= m; i++) {
    int a, b;
    cin >> a >> b;
    if (h[a] == 0) h[a] = 1, row--;
    if (l[b] == 0) l[b] = 1, co--;
    cout << row * co << endl;
  }
}
