#include using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i,m,n) for(int i=m; i bool chmin(T& a, T b){ if(a > b){a = b; return true;} return false; } template bool chmax(T& a, T b){ if(a < b){a = b; return true;} return false; } template T gcd(T a, T b){ return a % b ? gcd(b, a % b) : b; } template T lcm(T a, T b){ return a / gcd(a, b) * b; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N, M; ll 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(B)); ll ans = 0LL; rep(i, 0, N){ if(A[i]*B[0] > C){ ans += ll(M); continue; } if(A[i]*B[M-1] <= C) continue; int l = 0, h = M-1, m; while(h - l > 1){ m = (h + l) / 2; (A[i]*B[m] > C ? h : l) = m; } // cout << i << ' ' << h << endl; ans += ll(M - h); } printf("%.10f\n", double(ans)/double(N*M)); return 0; }