#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long INF = 1e18;
const int MAXN = 2e5 + 5;
const int T = 1e3 + 10;
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, -1, 1};
long long binpow(long long val, long long deg) {
  if (!deg) return 1;
  if (deg & 1) return binpow(val, deg - 1) * val % MOD;
  long long res = binpow(val, deg / 2);
  return (res * res) % MOD;
}
long long inv(long long a) { return binpow(a, MOD - 2); }
pair<int, int> operator+(const pair<int, int>& a, const pair<int, int>& b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
pair<int, int> operator-(const pair<int, int>& a, const pair<int, int>& b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
void rotate90(int& first, int& second, int x0, int y0) {
  first = first - x0;
  second = second - y0;
  swap(first, second);
  first = -first;
  first += x0;
  second += y0;
}
long long i, j;
long long n, m;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout.precision(10);
  cin >> n >> m;
  set<int> column, line;
  while (m--) {
    int first, second;
    cin >> first >> second;
    column.insert(first);
    line.insert(second);
    cout << (n - column.size()) * (n - line.size()) << " ";
  }
  return 0;
}
