#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(), (a).end() int main() { cin.tie(nullptr); ll N, M, C; cin >> N >> M >> C; vector A(N), B(M); rep(i, 0, N) cin >> A[i]; rep(i,0 , M) cin >> B[i]; sort(all(A)); sort(all(B)); ll cnt = 0; rep(i, 0, N) { ll key = C / A[i]; ll ind = upper_bound(all(B), key) - B.begin(); cnt += M - ind; } cout << fixed << setprecision(15) << (double)cnt / (double)(N * M) << '\n'; }