import bisect n, m, c = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) b.sort() total = 0 for ai in a: x = c // ai threshold = x + 1 pos = bisect.bisect_left(b, threshold) total += m - pos probability = total / (n * m) print("{0:.10f}".format(probability))