import math



def tri(x1, y1, x2, y2, x3, y3):

    return math.fabs((x2-x1)*(y3-y1) - (y2-y1)*(x3-x1)) / 2



while True:

    try:

        x1, y1, x2, y2, x3, y3, xp, yp = list(map(float, input().split()))

    except:

        break

    abc = tri(x1, y1, x2, y2, x3, y3)

    abp = tri(x1, y1, x2, y2, xp, yp)

    acp = tri(x1, y1, x3, y3, xp, yp)

    bcp = tri(x2, y2, x3, y3, xp, yp)

    x, y = int(abc*pow(10, 5)), int((abp+acp+bcp)*pow(10, 5))

    print(("YES" if x >= y else "NO"))
while True:

    try:

        x1, y1, x2, y2, x3, y3, xp, yp = list(map(float, input().split()))

    except:

        break

    AB = [x2-x1, y2-y1]

    BC = [x3-x2, y3-y2]

    CA = [x1-x3, y1-y3]

    BP = [xp-x2, yp-y2]

    CP = [xp-x3, yp-y3]

    AP = [xp-x1, yp-y1]

    v1 = AB[0]*BP[1]-AB[1]*BP[0]

    v2 = BC[0]*CP[1]-BC[1]*CP[0]

    v3 = CA[0]*AP[1]-CA[1]*AP[0]

    print((["NO", "YES"][(v1<0 and v2<0 and v3<0) or (v1>0 and v2>0 and v3>0)]))





import math


def tri(x1, y1, x2, y2, x3, y3):
    return math.fabs((x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1)) / 2


while True:
    try:
        x1, y1, x2, y2, x3, y3, xp, yp = list(map(float, input().split()))
    except:
        break
    abc = tri(x1, y1, x2, y2, x3, y3)
    abp = tri(x1, y1, x2, y2, xp, yp)
    acp = tri(x1, y1, x3, y3, xp, yp)
    bcp = tri(x2, y2, x3, y3, xp, yp)
    x, y = int(abc * pow(10, 5)), int((abp + acp + bcp) * pow(10, 5))
    print(("YES" if x >= y else "NO"))

while True:
    try:
        x1, y1, x2, y2, x3, y3, xp, yp = list(map(float, input().split()))
    except:
        break
    AB = [x2 - x1, y2 - y1]
    BC = [x3 - x2, y3 - y2]
    CA = [x1 - x3, y1 - y3]
    BP = [xp - x2, yp - y2]
    CP = [xp - x3, yp - y3]
    AP = [xp - x1, yp - y1]
    v1 = AB[0] * BP[1] - AB[1] * BP[0]
    v2 = BC[0] * CP[1] - BC[1] * CP[0]
    v3 = CA[0] * AP[1] - CA[1] * AP[0]
    print(
        (
            ["NO", "YES"][
                (v1 < 0 and v2 < 0 and v3 < 0) or (v1 > 0 and v2 > 0 and v3 > 0)
            ]
        )
    )

-import math - - -def tri(x1, y1, x2, y2, x3, y3): -    return math.fabs((x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1)) / 2 - - -    abc = tri(x1, y1, x2, y2, x3, y3) -    abp = tri(x1, y1, x2, y2, xp, yp) -    acp = tri(x1, y1, x3, y3, xp, yp) -    bcp = tri(x2, y2, x3, y3, xp, yp) -    x, y = int(abc * pow(10, 5)), int((abp + acp + bcp) * pow(10, 5)) -    print(("YES" if x >= y else "NO")) +    AB = [x2 - x1, y2 - y1] +    BC = [x3 - x2, y3 - y2] +    CA = [x1 - x3, y1 - y3] +    BP = [xp - x2, yp - y2] +    CP = [xp - x3, yp - y3] +    AP = [xp - x1, yp - y1] +    v1 = AB[0] * BP[1] - AB[1] * BP[0] +    v2 = BC[0] * CP[1] - BC[1] * CP[0] +    v3 = CA[0] * AP[1] - CA[1] * AP[0] +    print( +        ( +            ["NO", "YES"][ +                (v1 < 0 and v2 < 0 and v3 < 0) or (v1 > 0 and v2 > 0 and v3 > 0) +            ] +        ) +    )