from bisect import bisect_left 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_left(B,C/A[i]) for j in range(b,M): if A[i]*B[j] > C: count += (M-j) break print(count/(N*M))