import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
{
Scanner in
= new Scanner
(System.
in); double a1 = in. nextDouble(), a2 = in. nextDouble();
double b1 = in. nextDouble(), b2 = in. nextDouble();
double c1 = in. nextDouble(),c2 = in. nextDouble();
double x = in. nextDouble(), y = in. nextDouble(), f, g;
f = (y - a2)*(b1 - a1) - (x - a1)*(b2 - a2);
g = (c2 - a2)*(b1 - a1) - (c1 - a1)*(b2 - a2);
if (f*g > 0) {
f = (y - a2)*(c1 - a1) - (x - a1)*(c2 - a2);
g = (b2 - a2)*(c1 - a1) - (b1 - a1)*(c2 - a2);
if (f*g > 0) {
f = (y - b2)*(c1 - b1) - (x - b1)*(c2 - b2);
g = (a2 - b2)*(c1 - b1) - (a1 - b1)*(c2 - b2);
if (f*g > 0)
else
}
else
}
else
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWRvdWJsZSBhMSA9IGluLiBuZXh0RG91YmxlKCksIGEyID0gaW4uIG5leHREb3VibGUoKTsKCQlkb3VibGUgYjEgPSBpbi4gbmV4dERvdWJsZSgpLCBiMiA9IGluLiBuZXh0RG91YmxlKCk7CgkJZG91YmxlIGMxID0gaW4uIG5leHREb3VibGUoKSxjMiA9IGluLiBuZXh0RG91YmxlKCk7CgkJZG91YmxlIHggPSBpbi4gbmV4dERvdWJsZSgpLCB5ID0gaW4uIG5leHREb3VibGUoKSwgZiwgZzsKCQlmID0gKHkgLSBhMikqKGIxIC0gYTEpIC0gKHggLSBhMSkqKGIyIC0gYTIpOwoJCWcgPSAoYzIgLSBhMikqKGIxIC0gYTEpIC0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