#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
#define maxn 200010
#define maxm 200010
ll a[maxn],b[maxm],k;
int n,m;
inline void input(ll &x) {
x=0;
ll a=1;char c=getchar();
for(;c<'0'||c>'9';c=getchar())
if(c=='-') a=-1;
for(;c>='0'&&c<='9';c=getchar())
x=x*10+c-'0';
return;
}
inline void read(int &x) {
x=0;
int a=1;char c=getchar();
for(;c<'0'||c>'9';c=getchar())
if(c=='-') a=-1;
for(;c>='0'&&c<='9';c=getchar())
x=x*10+c-'0';
return;
}
inline bool judge(ll x) {
ll rank=0,j=m;
for(int i=1;i<=n;++i,rank+=j)
while(j>=1&&a[i]*b[j]>x) j--;
return rank<k?false:true;
}
int main() {
read(n),read(m),input(k);
for(int i=1;i<=n;++i) input(a[i]);
for(int i=1;i<=m;++i) input(b[i]);
sort(a+1,a+n+1);
sort(b+1,b+m+1);
ll l=0,r=a[n]*b[m],mid,ans;
while(l<=r) {
mid=l+r>>1;
if(judge(mid)) {
r=mid-1;
ans=mid;
} else l=mid+1;
}
cout<<ans;
return 0;
}