n,m,c = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) count = 0 now = m-1 a.sort() b.sort() for i in a: while now >= 0 and i*b[now] > c: now -= 1 count += m-now-1 print(count/(m*n))