#include <bits/stdc++.h>
using namespace std;
const int N = int(1e6);
const int INF = 1e9 + 7;
long long n, m;
map<long long, long long> m1, m2;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    long long x, y;
    cin >> x >> y;
    m1[x] = 1, m2[y] = 1;
    printf("%lld\n", n * n - ((long long)m1.size() + (long long)m2.size()) * n +
                         ((long long)m1.size() * (long long)m2.size()));
  }
  return 0;
}
