#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(0); cin.tie(0); ll n, m, c; cin >> n >> m >> c; vector a(n), b(m); for (ll i = 0; i < n; i++) { cin >> a[i]; } for (ll i = 0; i < m; i++) { cin >> b[i]; } sort(begin(a), end(a)); sort(begin(b), end(b)); ll pos = n - 1, cnt = 0; for (ll i = 0; i < n; i++) { while (pos >= 0) { if (a[i] * b[pos] <= c) { break; } else { pos--; } } cnt += n - 1 - pos; } cout << setprecision(10); cout << (double)cnt / (n * m) << '\n'; }