import sys def S(): return sys.stdin.readline().rstrip() def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LS(): return list(sys.stdin.readline().rstrip().split()) n,m,c = MI() a = sorted(LI()) b = sorted(LI()) j = m-1 cnt = 0 for i in range(n): cnt += m-1-j while j >= 0: if a[i]*b[j] > c: cnt += 1 j -= 1 else: break print(cnt/(m*n))