#include typedef long long ll; using namespace std; int INF = 1e9; int MOD = 1e9+7; int fact(int n){ if(n == 1)return 1; return n*fact(n-1); } main(){ int N; cin >> N; vectorA,B; for(int i = 0;i < N;i++){int a;cin >> a;A.push_back(a);} for(int i = 0;i < N;i++){int a;cin >> a;B.push_back(a);} sort(A.begin(),A.end()); sort(B.begin(),B.end()); int v = 0; do{ do{ int cnt = 0; for(int i = 0;i < N;i++){ if(A[i] > B[i])cnt++; else cnt--; } if(cnt > 0)v++; }while(next_permutation(B.begin(),B.end())); }while(next_permutation(A.begin(),A.end())); cout << 1. * v / (fact(N)*fact(N)) << endl;; }