#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using P = pair; constexpr int INF = 1001001001; constexpr int mod = 1000000007; // constexpr int mod = 998244353; template inline bool chmax(T& x, T y){ if(x < y){ x = y; return true; } return false; } template inline bool chmin(T& x, T y){ if(x > y){ x = y; return true; } return false; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N, M; ll C; cin >> N >> M >> C; vector a(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()); double ans = 0.0; for(int i = 0; i < N; ++i){ ans += end(b) - upper_bound(begin(b), end(b), C / a[i]); } ans /= N * M; cout << fixed << setprecision(15); cout << ans << endl; return 0; }