#include using namespace std; int main() { long N, M, C; cin >> N >> M >> C; vector A(N), B(M); for (int i = 0; i < N; i++) cin >> A.at(i); for (int i = 0; i < M; i++) cin >> B.at(i); sort(B.begin(), B.end()); long cnt = 0;; for (auto a : A) { int tmp = upper_bound(B.begin(), B.end(), (double)C / a) - B.begin(); cnt += M - tmp; } cout << fixed << setprecision(6) << (long double)cnt / N / M << "\n"; }