#!ruby -an x,y,c,d,e,f,g,h=$F.map(&:to_i);a=x-c;b=y-d;c-=e;d-=f;e-=g;f-=h;g-=x;h-=y;p e*g+f*h>(a*c+b*d)*(e*h-f*g)/(b*c-a*d)?1:0