/** * @FileName a.cpp * @Author kanpurin * @Created 2020.11.06 21:45:23 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { ll n,m,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()); ll sum = 0; for (int i = 0; i < n; i++) { auto t = lower_bound(b.begin(), b.end(), c/a[i]+1); sum += b.end()-t; } printf("%.10f\n",(double)sum/n/m); return 0; }