#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  bool row[100000];
  bool cross[100000];
  memset(row, false, sizeof row);
  memset(cross, false, sizeof cross);
  long long rr = 0, cc = 0;
  for (int i = 0; i < m; i++) {
    long long ans = n * n;
    long long x, y;
    cin >> x >> y;
    if (row[x - 1] == false) {
      row[x - 1] = true;
      rr++;
    }
    if (cross[y - 1] == false) {
      cross[y - 1] = true;
      cc++;
    }
    ans = ans - n * cc - n * rr + rr * cc;
    cout << ans << ' ';
  }
  return 0;
}
