#include #define rep(i, n) for(int (i) = 0; (i) < (n); (i)++) #define repe(i, n) for(i = 0; i <= (n); i++) #define repr(i, n) for(int (i) = (n); (i) > 0; --(i)) #define repre(i, n) for(int (i) = (n); (i) >= 0; --(i)) using namespace std; using ll = long long; using ull = unsigned long long; using P = pair; using Graph = vector>; const int INF = INT32_MAX; const ll MOD = 1e9+7; signed main() { ll n, m, c; cin >> n >> m >> c; vector a(n,0), b(m,0); rep(i,n)cin >> a[i]; rep(i,m)cin >> b[i]; sort(a.begin(), a.end()); sort(b.begin(), b.end()); ll ans = 0; rep(i,n){ ll low = c / a[i]; low++; auto l = lower_bound(b.begin(), b.end(), low); auto index = distance(b.begin(), l); ans += (m - index); cout << ans << endl; } double as = ans / double(n*m); cout << as << endl; return 0; }