m@main=getLine>>=print.i.map read.words>>m i[a,b,c,d,e,f,g,h]=sum[1|0>sin p*sin(p-t(b-h)(a-g)+t(d-h)(c-g))]where p=t(b-f)(a-e)-t(d-f)(c-e);t=atan2