n, m, c = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) b.sort() def nibutan_max(a, L, R, x): while L <= R: M = (L + R) // 2 if a[M] <= x: L = M + 1 elif x < a[M]: R = M - 1 return R ans = 0 for x in a: y = nibutan_max(b, 0, len(b) - 1, c / x) if y == 0 and x * b[0] > c: ans += len(b) elif y == 0: ans += len(b) - 1 else: ans += len(b) - y - 1 print(ans/ (n * m))