N,M,C=map(int, input().split()) a_ls=list(map(int, input().split())) b_ls=list(map(int, input().split())) a_ls.sort(reverse=True) b_ls.sort() i=0 ans=0 for a in a_ls: while a*b_ls[i]<=C: i+=1 if i==M: i=M-1 break if i==M-1 and a*b_ls[M-1]<=C: ans+=0 else: ans+=(M-i) print(float(ans)/(N*M))