#include #include #include #include using lint = long long; using ldouble = long double; void solve() { int n, m; lint c; std::cin >> n >> m >> c; std::vector xs(n), ys(m); for (auto& x : xs) std::cin >> x; for (auto& y : ys) std::cin >> y; std::sort(ys.begin(), ys.end()); lint ans = 0; for (auto x : xs) { lint l = c / x; ans += ys.end() - std::upper_bound(ys.begin(), ys.end(), l); } std::cout << ldouble(ans) / (ldouble(n) * m) << "\n"; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); std::cout << std::fixed << std::setprecision(10); solve(); return 0; }