#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int64_t N, M, C; cin >> N >> M >> C; vector A(N), B(M); for (auto &&e : A) { cin >> e; } for (auto &&e : B) { cin >> e; } sort(A.begin(), A.end()); sort(B.begin(), B.end()); int64_t x = 0; for (int64_t a : A) { int lo = 0, hi = M; while (lo < hi) { int mi = (lo + hi) / 2; if (B[mi] * a > C) { hi = mi; } else { lo = mi + 1; } } x += M - hi; } cout << fixed << setprecision(10) << (long double)x / N / M << '\n'; return 0; }