#include <bits/stdc++.h>
const long long oo = 1e9;
const long long mod = 95542721;
const long long MAX = 1e9;
const long long ARR = 1e5;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long n, m;
  set<long long> x, y;
  cin >> n >> m;
  for (long long i = (0); i < (long long)(m); ++i) {
    int a, b;
    cin >> a >> b;
    x.insert(a), y.insert(b);
    cout << (n - x.size()) * (n - y.size()) << " ";
  }
}
