import itertools import math N = int(input()) A = list(map(int, input().split(" "))) B = list(map(int, input().split(" "))) count = 0 total = 0 for b in itertools.permutations(B): wins = 0 for i in range(N): wins += 1 if b[i] < A[i] else 0 if wins > N//2: count += 1 fact = math.factorial(N) print(float(count / fact))