def side(p1, p2, p3):
    return (p3[1]-p1[1])*(p2[0]-p1[0])-(p2[1]-p1[1])*(p3[0]-p1[0])>0

while True:
    try:
        x = map(float, raw_input().split())
        p1 = x[0:2]
        p2 = x[2:4]
        p3 = x[4:6]
        p0 = x[6:]
        if (side(p1, p2, p0)==side(p2, p3, p0) and side(p2, p3, p0)==side(p3, p1, p0)):
            print "YES"
        else:
            print "NO"
    except:
        break