#include using namespace std; typedef long long ll; typedef long double ld; #define REP(i, n) for (int i = 0; i < (n); ++i) #define REPR(i, n) for (int i = n - 1; i >= 0; --i) #define FOR(i, m, n) for (int i = m; i < n; ++i) #define FORR(i, m, n) for (int i = m; i >= n; --i) #define ALL(v) (v).begin(),(v).end() templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> n >> m >> c; vector a(n),b(m); REP(i,n) cin >> a[i]; REP(i,m) cin >> b[i]; sort(ALL(b)); ll res=0; REP(i,n){ int t=upper_bound(ALL(b),c/a[i])-b.begin(); res+=m-t; } cout << fixed << setprecision(10) << double(res)/double(n*m) << endl; }