import itertools N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) ans=0 for AA in itertools.permutations(A): if sum(a>b for a,b in zip(AA,B))*2>N: ans+=1 for i in range(1,N+1): ans/=i print(ans)