#include <bits/stdc++.h>
using namespace std;
int SET(int n, int pos) { return n = n | (1 << pos); }
int RESET(int n, int pos) { return n = n & ~(1 << pos); }
int CHECK(int n, int pos) { return (bool)(n & (1 << pos)); }
int str2int(string s) {
  stringstream ss(s);
  int x;
  ss >> x;
  return x;
}
string int2str(int a) {
  stringstream ss;
  ss << a;
  string str = ss.str();
  return str;
}
string char2str(char a) {
  stringstream ss;
  ss << a;
  string str = ss.str();
  return str;
}
long long int bigMod(long long int n, long long int power, long long int MOD) {
  if (power == 0) return 1;
  if (power % 2 == 0) {
    long long int ret = bigMod(n, power / 2, MOD);
    return ((ret % MOD) * (ret % MOD)) % MOD;
  } else
    return ((n % MOD) * (bigMod(n, power - 1, MOD) % MOD)) % MOD;
}
long long int modInverse(long long int n, long long int MOD) {
  return bigMod(n, MOD - 2, MOD);
}
int POW(int x, int y) {
  int res = 1;
  for (; y;) {
    if ((y & 1)) {
      res *= x;
    }
    x *= x;
    y >>= 1;
  }
  return res;
}
int inverse(int x) {
  double p = ((double)1.0) / x;
  return (p) + 1e-9;
}
int gcd(int a, int b) {
  while (b) b ^= a ^= b ^= a %= b;
  return a;
}
int nC2(int n) { return n * (n - 1) / 2; }
long long int MOD(long long int n, long long int mod) {
  if (n >= 0)
    return n % mod;
  else if (-n == mod)
    return 0;
  else
    return mod + (n % mod);
}
const int mx = 100005;
long long int row[mx], col[mx];
vector<long long int> ans;
int main() {
  long long int n, m, r = 0, c = 0;
  scanf("%lld %lld", &n, &m);
  long long int cnt = n - 1;
  long long int last = n * n;
  for (int i = 0; i < m; i++) {
    long long int p, q;
    scanf("%lld %lld", &p, &q);
    if (!row[p]) r++;
    if (!col[q]) c++;
    long long int pp = 0;
    if (!row[p]) {
      pp += n - c;
    }
    if (!col[q]) {
      pp += n - r;
    }
    if (!row[p] && !col[q]) pp++;
    pp = last - pp;
    ans.push_back(pp);
    last = pp;
    row[p] = 1;
    col[q] = 1;
  }
  for (int i = 0; i < ans.size(); i++) {
    printf("%lld ", ans[i]);
  }
  return 0;
}
