Go: package main

import (
        "fmt"
)

func main() {
        var x1, y1, x2, y2, x3, y3, px, py float64
        var oax, oay, obx, oby, opx, opy float64
        var det float64
        var s, t float64

        for {
                _, err := fmt.Scanf("%f %f %f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3, &px, &py)
                if err != nil {
                        break
                }
                oax = x2 - x1
                oay = y2 - y1
                obx = x3 - x1
                oby = y3 - y1
                opx = px - x1
                opy = py - y1
                det = oax*oby - obx*oay

                if det == 0 {
                        fmt.Printf("NO\n")
                } else {
                        s = (oby*opx - obx*opy) / det
                        t = (oax*opy - oay*opx) / det

                        if (s+t < 1 && s > 0 && t > 0) {
                                fmt.Printf("YES\n")
                        } else {
                                fmt.Printf("NO\n")
                        }
                }
        }
}

Python: # -*- coding: utf-8 -*-
import sys
import cmath
import math

class Point(object):
    def __init__(self, x, y):
        self.point = complex(x, y)

    def __str__(self):
        return "x = {0}, y = {1}".format(self.point.real, self.point.imag)


class Triangle(Point):
    def __init__(self, a, b, c):
        self.a = a
        self.b = b
        self.c = c

        # ３辺の長さ
        self.edgeA = abs(b.point-c.point)
        self.edgeB = abs(c.point-a.point)
        self.edgeC = abs(a.point-b.point)

        # ３角の大きさ
        self.angleA = Triangle.angle(self.edgeA, self.edgeB, self.edgeC)
        self.angleB = Triangle.angle(self.edgeB, self.edgeC, self.edgeA)
        self.angleC = Triangle.angle(self.edgeC, self.edgeA, self.edgeB)

    # 角度を求める
    def angle(A, B, C):
        return cmath.acos( (B*B+C*C-A*A)/(2*B*C) ).real


eps = 0.0001
for line in sys.stdin:
    line = [float(x) for x in line.split()]
    p1 = Point(line[0], line[1])
    p2 = Point(line[2], line[3])
    p3 = Point(line[4], line[5])
    P  = Point(line[6], line[7])
    t1 = Triangle(p1, p2, P)
    t2 = Triangle(p2, p3, P)
    t3 = Triangle(p3, p1, P)
    if (math.degrees(t1.angleC + t2.angleC + t3.angleC) <= 360+eps) and (math.degrees(t1.angleC + t2.angleC + t3.angleC) >= 360-eps):
        print("YES")
    else:
        print("NO")

Python: g=lambda a,b:a[0]*b[1]-a[1]*b[0]

while True:
    try:t=input()
    except:break
    l=[float(i) for i in t.split()]
    ba=[l[0]-l[2],l[1]-l[3]]
    ab=[-i for i in ba]
    cb=[l[2]-l[4],l[3]-l[5]]
    bc=[-i for i in cb]
    ca=[l[0]-l[4],l[1]-l[5]]
    ac=[-i for i in ca]
    ap=[l[6]-l[0],l[7]-l[1]]
    bp=[l[6]-l[2],l[7]-l[3]]
    cp=[l[6]-l[4],l[7]-l[5]]
    p=[g(ab,ac) , g(ab,ap) , g(ba,bc) , g(ba,bp) , g(ca,cb) , g(ca,cp)]
    if p[0]*p[1]<0 or p[2]*p[3]<0 or p[4]<p[5]<0 or abs(p[0])<abs(p[1]) or abs(p[2])<abs(p[3]) or abs(p[4])<abs(p[5]):
        print("NO")
    else:
        print("YES")

Python: def rot(xa,ya,xb,yb,xc,yc):
    r=(xb-xa)*(yc-ya)-(xc-xa)*(yb-ya)
    if r>0:return 1
    if r==0:return 0
    if r<0:return -1
while 1:
    try:
        x1,y1,x2,y2,x3,y3,xp,yp=map(float,input().split(" "))
        if rot(x1,y1,x2,y2,xp,yp)==rot(x2,y2,x3,y3,xp,yp)==rot(x3,y3,x1,y1,xp,yp):
            print("YES")
        else:
            print("NO")
    except:break

Python: while True:
    try:
        x1, y1, x2, y2, x3, y3, xp, yp = 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)])

Python: import sys
def f(a,b,c,d):z=(c-a)*(y-d)-(d-b)*(x-c);return([-1,1][z>0],0)[z==0]
for e in sys.stdin:
 p,q,r,s,t,u,x,y=map(float,e.split())
 print(['NO','YES'][f(p,q,r,s)==f(r,s,t,u)==f(t,u,p,q)])

Python: def stl1(x):
    if a == e:
        y = b
    else:
        y = (f-b)*(x-a)/(e-a) +b

    return(y)

def stl2(x):
    if c == e:
        y = f
    else:
        y = (d-f)*(x-e)/(c-e) +f

    return(y)

def stl3(x):
    if c == a:
        y = b
    else:
        y = (d-b)*(x-a)/(c-a) +b
        
    return(y)

while True:
    try:
        lst = list(map(float, input().split()))
        point1 = [lst[0], lst[1]]
        point2 = [lst[2], lst[3]]
        point3 = [lst[4], lst[5]]
        xp, yp = lst[6], lst[7]

        pointlst = [point1, point2, point3]
        pointlst.sort()
        a, b, e, f, c, d = pointlst[0][0], pointlst[0][1], pointlst[1][0], pointlst[1][1], pointlst[2][0], pointlst[2][1]

        if a <= xp and xp <= e:
            bdr1 = stl1(xp)
            bdr3 = stl3(xp)

            if min(bdr1, bdr3) <= yp and yp <= max(bdr1, bdr3):
                print("YES")

            else:
                print("NO")
        
        elif e < xp and xp <= c:
            bdr2 = stl2(xp)
            bdr3 = stl3(xp)

            if min(bdr2, bdr3) <= yp and yp <= max(bdr2, bdr3):
                print("YES")
            
            else:
                print("NO")

        else:
            print("NO")

    except EOFError:
        break

Python: 
def cross_product(a,b):#a,bは複素数、だけどベクトル扱いしよう
    return (a.conjugate()*b).imag

def abs_area_vector(ax,ay,bx,by):#3点(0,0)(ax,ay)(bx,by)で構成される三角形の面積の絶対値
    return abs(0.5 * (cross_product(complex(ax,ay),complex(bx,by))))

def abs_area_3point(ax,ay,bx,by,cx,cy):#3点(ax,ay)(bx,by)(cx,cy)で構成される三角形の面積の絶対値
    return abs_area_vector(bx-ax,by-ay,cx-ax,cy-ay)

try:
    while True:
        x1,y1,x2,y2,x3,y3,xp,yp = map(float,input().split())
        abc = abs_area_3point(x1,y1,x2,y2,x3,y3)
        pab = abs_area_3point(x1,y1,x2,y2,xp,yp)
        pbc = abs_area_3point(x2,y2,x3,y3,xp,yp)
        pca = abs_area_3point(x1,y1,x3,y3,xp,yp)
        #ここらへんで結構ミスあったから今度からはもっと簡潔に書けるように何か関数でも用意すべき
        print("NO" if pab * pbc * pca == 0 or abc != pab + pbc + pca else "YES")
except  (EOFError,ValueError):
    pass

Python: g=lambda a,b:abs(a[0]*b[1]-a[1]*b[0])

while True:
    t=input()
    if t=="":break
    l=[float(i) for i in t.split()]
    ba=[l[0]-l[2],l[1]-l[3]]
    ab=[-i for i in ba]
    cb=[l[2]-l[4],l[3]-l[5]]
    bc=[-i for i in cb]
    ca=[l[0]-l[4],l[1]-l[5]]
    ac=[-i for i in ca]
    ap=[l[6]-l[0],l[7]-l[1]]
    bp=[l[6]-l[2],l[7]-l[3]]
    cp=[l[6]-l[4],l[7]-l[5]]
    if g(ab,ac)<g(ab,ap) or g(ba,bc)<g(ba,bp) or g(ca,cb)<g(ca,cp):
        print("NO")
    else:
        print("YES")

Python: try:
    while True:
        li = [float(x) for x in input().split()]
        if li:
            lix = [li[i] for i in range(6) if i % 2 == 0]
            liy = [li[i] for i in range(6) if i % 2 != 0]
            x, y = li[6], li[7]
            if min(lix) < x < max(lix) and min(liy) < y < max(liy):
                print("YES")
            else:
                print("NO")
except EOFError:
    pass

Python: import sys

def is_counter_clockwise(x1, y1, x2, y2, x3, y3):
    px = x2 - x1
    py = y2 - y1
    qx = x3 - x1
    qy = y3 - y1
    return px * qy - py * qx > 0

def is_in_triangle(x1, y1, x2, y2, x3, y3, xp, yp):
    if is_counter_clockwise(x1, y1, x2, y2, x3, y3):
        return is_counter_clockwise(x1, y1, x2, y2, xp, yp) and \
            is_counter_clockwise(x2, y2, x3, y3, xp, yp) and \
            is_counter_clockwise(x3, y3, x1, y1, xp, yp)
    else:
        return is_counter_clockwise(x1, y1, x3, y3, xp, yp) and \
            is_counter_clockwise(x3, y3, x2, y2, xp, yp) and \
            is_counter_clockwise(x2, y2, x1, y1, xp, yp)

for line in sys.stdin:
    x1, y1, x2, y2, x3, y3, xp, yp = map(float, line.split())
    if is_in_triangle(x1, y1, x2, y2, x3, y3, xp, yp):
        print("YES")
    else:
        print("NO")