import sys input = sys.stdin.readline from bisect import * N, M, C = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) a.sort() b.sort() c = 0 for ai in a: c += M-bisect_right(b, C//ai) print(c/N/M)