n, m, c = map(int, input().split()) a = sorted(map(int, input().split())) b = sorted(map(int, input().split())) cnt = 0 i = 0 for y in reversed(b): while i < n and a[i] * y <= c: i += 1 cnt += i tot = n * m cnt = tot - cnt print(cnt / tot)