#include <bits/stdc++.h>
const int oo = INT_MAX;
const long long OO = LLONG_MAX;
using namespace std;
int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
int dy[] = {1, 0, -1, 0, 1, -1, 1, -1};
int dx1[] = {-1, 1, 0, 0};
int dy1[] = {0, 0, -1, 1};
void file() {
  ios_base::sync_with_stdio(false);
  cout.tie(NULL);
  cin.tie(NULL);
}
int main() {
  file();
  long long n, q;
  cin >> n >> q;
  vector<bool> row(n, 0), col(n, 0);
  long long ans = n * n;
  int x, y;
  long long nr = 0, nc = 0;
  while (q--) {
    cin >> x >> y;
    x--, y--;
    long long tmp =
        (n - 1) * (row[x] + col[y]) + 1 + (nc * !row[x]) + (nr * !col[y]);
    if (row[x] && col[y]) tmp++;
    ans -= ((2 * n) - tmp);
    if (!row[x]) nr++;
    if (!col[y]) nc++;
    row[x] = true;
    col[y] = true;
    cout << ans << ' ';
  }
}
