#include #include #include #include #include #define rep(i,n) for(int i=0; i<(int)(n); i++) using namespace std; using LL = long long; const int Max_N = 1e5; const LL Max_C = 1e18; const LL Max_A = 1e9; int main(){ LL N, M, C; cin >> N >> M >> C; assert(1 <= N and N <= Max_N); assert(1 <= M and M <= Max_N); assert(1 <= C and C <= Max_C); vector a(N), b(M); rep(i,N) cin >> a[i]; rep(i,N) assert(1 <= a[i] and a[i] <= Max_A); rep(i,M) cin >> b[i]; rep(i,M) assert(1 <= b[i] and b[i] <= Max_A); sort(b.begin(),b.end()); double ans = 0; rep(i,N){ int left = -1, right = M; int mid = (left + right) / 2; while(right - left > 1){ if(a[i] * b[mid] > C) right = mid; else left = mid; mid = (left + right) / 2; } ans += M - right; } ans /= N * M; cout << setprecision(15) << ans << endl; return 0; }