#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m = 0;
  long long b, c = 0;
  long long s, k = 0;
  cin >> n >> m;
  long long remain = n * n;
  map<int, int> A;
  map<int, int> B;
  long long row = n;
  long long col = n;
  A[0] = 0;
  B[0] = 0;
  for (long long i = 0; i < m; i++) {
    cin >> b >> c;
    if (A[b] == 1 && B[c] != 1) {
      remain = remain - col;
    }
    if (A[b] != 1 && B[c] == 1) {
      remain = remain - row;
    }
    if (A[b] != 1 && B[c] != 1) {
      remain = remain - row - col + 1;
    }
    if (A[b] != 1) {
      col = col - 1;
    }
    if (B[c] != 1) {
      row = row - 1;
    }
    A[b] = 1;
    B[c] = 1;
    cout << remain << " ";
  }
  return 0;
}
