#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 7;
double dp[maxn][maxn];
int n, m;
int a[maxn], b[maxn];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) a[i] = b[i] = 0;
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    a[x] = 1;
    b[y] = 1;
  }
  int cnta = 0, cntb = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i]) cnta++;
    if (b[i]) cntb++;
  }
  for (int i = n; i >= 0; i--) {
    for (int j = n; j >= 0; j--) {
      if (i == n && j == n) continue;
      double p1 = (1.0 * i) / (1.0 * n);
      double p2 = (1.0 * j) / (1.0 * n);
      double p3 = 1.0 - p1;
      double p4 = 1.0 - p2;
      dp[i][j] = ((dp[i + 1][j] + 1) * p3 * p2 + (dp[i][j + 1] + 1) * p1 * p4 +
                  (dp[i + 1][j + 1] + 1) * p3 * p4 + p1 * p2) /
                 (1.0 - p1 * p2);
    }
  }
  printf("%.5f\n", dp[cnta][cntb]);
  return 0;
}
