#include <bits/stdc++.h>
using namespace std;
long long int powmod(long long int a, long long int b) {
  if (b == 0) return 1;
  long long int x = powmod(a, b / 2);
  long long int y = (x * x) % 1000000007;
  if (b % 2) return (a * y) % 1000000007;
  return y % 1000000007;
}
int main() {
  long long int n, m;
  scanf("%lld", &n);
  scanf("%lld", &m);
  long long int dr = 0, dc = 0;
  set<long long int> row;
  set<long long int> col;
  set<long long int>::iterator itr, itc;
  long long int x, y;
  long long int left = n * n;
  vector<long long int> p;
  for (int i = 0; i < m; i++) {
    long long int ans;
    scanf("%lld", &x);
    scanf("%lld", &y);
    itr = row.find(x);
    itc = col.find(y);
    if (itc == col.end() && itr == row.end()) {
      ans = (n - dr) + (n - dc) - 1;
      ans = left - ans;
      p.push_back(ans);
      left = ans;
      dr++;
      dc++;
    } else if (itc == col.end() && itr != row.end()) {
      ans = n - dr;
      ans = left - ans;
      p.push_back(ans);
      left = ans;
      dc++;
    } else if (itc != col.end() && itr == row.end()) {
      ans = n - dc;
      ans = left - ans;
      p.push_back(ans);
      left = ans;
      dr++;
    } else if (itc != col.end() && itr != row.end()) {
      ans = left;
      p.push_back(ans);
      left = ans;
    }
    row.insert(x);
    col.insert(y);
  }
  for (int i = 0; i < (int)(p.size()); i++) printf("%lld ", p[i]);
  printf("\n");
  return 0;
}
