#include using namespace std; #define int long long #define rep(i,n) for(int i=0; i<(int)n; i++) #define rep1(i,n) for(int i=1; i<(int)n; i++) #define repa(i,a,n) for(int i=(a); i<(int)(n); i++) #define all(vec) vec.begin(),vec.end() #define COUT(x) cout<<(x)<; using vs = vector; using vvi = vector; using pii = pair; using vpii = vector; const int dx[4] = {1, 0,-1, 0}; const int dy[4] = {0, 1, 0,-1}; int gcd(int a, int b){if(a%b == 0){return(b);}else{return(gcd(b, a%b));}} int lcm(int a, int b){return a/gcd(a, b)*b;} template bool chmax(T &a,const T& b){if(a bool chmin(T &a,const T& b){if(a>b){a=b;return true;}return false;} //cout << fixed << setprecision(15); int N, M, K, H, W, X, Y; string S,T; const int INF = 1e18; const int mod = 1e9+7; signed main(){ int C; cin >> N >> M >> C; vi A(N); rep(i,N){cin >> A[i];} sort(all(A)); vi B(M); rep(i,M) cin >> B[i]; sort(all(B)); double ans = 0; rep(i,N){ if(B.size()==1){ if(B[0]*A[i]>C) ans++; continue; } int l = 0; int r = M; while(l+1 != r){ int s = (l+r)/2; if(A[i]*B[s]>C) r = s; else l = s; } if(l==0) ans += M; else if(l== M-1) continue; else ans += M-r; } cout << fixed << setprecision(15); COUT(ans/(N*M)); return 0; }