import sys import math sys.setrecursionlimit(10 ** 7) def input() : return sys.stdin.readline().strip() def INT() : return int(input()) def MAP() : return map(int,input().split()) def LIST() : return list(MAP()) def NIJIGEN(H): return [list(input()) for i in range(H)] a,b,c,d,e,f=map(int,input().split()) c=c/a d=d/b N=c/2 M=d/2 s=N**2+M**2 k=f-e+s print(math.sqrt(k))