#include "bits/stdc++.h" using namespace std; int main() { int N, M; cin >> N >> M; long long C; cin >> C; vectora(N), b(M); for (int i = 0; i < N; i++)cin >> a[i]; for (int i = 0; i < M; i++)cin >> b[i]; sort(b.begin(), b.end()); int cnt = 0; for (int i = 0; i < N; i++) { int now = C / a[i]; cnt += (M - (upper_bound(b.begin(), b.end(), now) - b.begin())); } double ans = (double)cnt / (double)(N*M); cout << fixed << setprecision(15) << ans << endl; }