from bisect import bisect N,M,C = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) A.sort() B.sort() count = 0 for i in range(N): b = bisect(B,C//A[i]) if b == M: continue count += (M-b) print(count/(N*M))