import Complex m@main=getLine>>=print.i.map read.words>>m i[a,b,c,d,e,f,g,h]=sum[1|0>phase p*phase(p/z(a-g)(b-h)*z(c-g)(d-h))]where p=z(a-e)(b-f)/z(c-e)(d-f);z=(:+)