def bsearch(mn, mx, func): #func(i)=False を満たす最大のi (mn<=i1: if func(idx): idx, mx = (idx + mn)//2, idx continue idx, mn = (idx + mx)//2, idx return idx N, M, C = map(int, input().split()) X = list(map(int, input().split())) Y = list(map(int, input().split())) Y.sort() b =R = 0 for x in X: i = bsearch(-1, M, lambda t: Y[t]*x > C) R += M-i-1 b+=M print(R/b)