n, m, c = map(int, input().split()) a = sorted(list(map(int, input().split()))) b = sorted(list(map(int, input().split())), reverse=True) ans = 0 index = 0 for x in a: while index < m and x * b[index] > c: index += 1 ans += index print(ans / (n * m))