[n,m,c]=list(map(int,input().split())) a=list(map(int, input().split())) b=list(map(int, input().split())) count=0 s=n*m for i in range(n): for j in range(m): x=a[i]*b[j] if(x>c): count+=1 print(count/s)