n, m, c = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) + [c + 1] A.sort() B.sort() lose = 0 p = 0 for a in A[::-1]: while a * B[p] <= c: p += 1 lose += p print((n * m - lose) / (n * m))