#include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; ll mod = 1e9 + 7; int main(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(15); int n , m; ull c; cin >> n >> m >> c; vector a(n) , b(m); for(int i = 0; i < n; i++){ cin >> a[i]; } for(int i = 0; i < m; i++){ cin >> b[i]; } sort(a.begin() , a.end()); sort(b.begin() , b.end()); ull cnt = 0; int j = m - 1; for(int i = 0; i < n; i++){ while(j >= 0){ if(a[i] * b[j] <= c){ break; } j--; } cnt += m - 1 - j; //cout << cnt << endl; } ld ans = (ld)cnt / n / m; cout << ans << endl; return 0; }