from math import* t=atan2 while 1:a,b,c,d,e,f,g,h=map(int,raw_input().split());p=t(b-f,a-e)-t(d-f,c-e);print+(0>sin(p)*sin(p-t(b-h,a-g)+t(d-h,c-g)))