from collections import Counter n,m,c = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) a = sorted(a)[::-1] b_counter = Counter(b) b_key = sorted(list(b_counter.keys()))[::-1] ans = 0 for i in range(n): elem = c // a[i] if(b_key[-1] > elem): ans += m else: for j in range(len(b_key)): if(b_key[j] > elem): ans += b_counter[b_key[j]] else: break print(ans / (n * m))