#include #define rep(i,n) for(int i=(0);i<(n);i++) using namespace std; typedef long long ll; template bool chmax(T &a, const T &b) { if (a bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; } int main(){ cin.tie(0); ios::sync_with_stdio(false); ll n, m, c; cin >> n >> m >> c; vector a(n), b(m); rep(i, n) cin >> a[i]; rep(i, m) cin >> b[i]; sort(a.begin(), a.end()); sort(b.begin(), b.end()); ll tmp = 0; rep(i, n){ auto it = upper_bound(b.begin(), b.end(), c / a[i]); if(it == b.end()) continue; tmp += m - distance(b.begin(), it); } cout << fixed << setprecision(10); cout << (double) tmp / (n * m) << endl; }