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: 

while 1:
    try:
        x1, y1, x2, y2, x3, y3, px, py = map(float, input().split())
        a = (x2-x1) * (py-y1) - (y2-y1) * (px-x1)
        b = (x3-x2) * (py-y2) - (y3-y2) * (px-x2)
        c = (x1-x3) * (py-y3) - (y1-y3) * (px-x3)
        if (a < 0 and b < 0 and c < 0) or (a > 0 and b > 0 and c > 0):
            print("YES")
        else:
            print("NO")
    except:
        break;

Python: length=[float(0) for i in range(3)]
while 1:
    try:
      x1,y1,x2,y2,x3,y3,x4,y4=[float(i) for i in input().split( )]
      len1=(x1-x2)**2+(y1-y2)**2
      len2=(x2-x3)**2+(y2-y3)**2
      len3=(x3-x1)**2+(y3-y1)**2
      length[0]=(x1-x4)**2+(y1-y4)**2
      length[1]=(x2-x4)**2+(y2-y4)**2
      length[2]=(x3-x4)**2+(y3-y4)**2
      if ((max(length)>len1)and(max(length)>len2)and(max(length)>len3)):
          print("NO")
      else:
          print("YES")
    except EOFError:
        break

Python: import math
while True:
    try:
        x1, y1, x2, y2, x3, y3, xp, yp = map(float, input().split())
        x = [x1, x3, x3, x1]
        y = [y1, y2, y3, y1]
        x = list(map(lambda x:x-xp, x))
        y = list(map(lambda y:y-yp, y))
        cos = lambda a1,a2,b1,b2:(a1*b1+a2*b2)/((a1**2+a2**2)**0.5*(b1**2+b2**2)**0.5)
        if sum(math.acos(cos(x[i], y[i], x[i+1], y[i+1])) for i in range(3)) < 2 * math.pi - 1e-3:
            print('NO')
        else:
            print('YES')
    except:
        break

Python: while(True):
    try:
        x1,y1,x2,y2,x3,y3,xp,yp = map(float, input().split())
        c1 = (x2-x1)*(yp-y1)-(y2-y1)*(xp-x1)
        c2 = (x3-x2)*(yp-y2)-(y3-y2)*(xp-x2)
        c3 = (x1-x3)*(yp-y3)-(y1-y3)*(xp-x3)
        if (c1<0 and c2<0 and c3<0) or (c1>0 and c2>0 and c3>0):
            print("YES")
            continue
        print("NO")
    except:
        break

Python: import sys
def area(x1,y1,x2,y2,x3,y3):
    return abs((x1*(y2-y3) + x2*(y3-y1)+ x3*(y1-y2))/2.0)
for line in sys.stdin.readlines():
    x1, y1, x2, y2, x3, y3, xp, yp=map(float,line.split())
    a1=area(x1,y1,x2,y2,xp,yp)
    a2=area(x3,y3,x2,y2,xp,yp)
    a3=area(x1,y1,x3,y3,xp,yp)
    a=area(x1,y1,x2,y2,x3,y3)
    if(a==(a1+a2+a3)):
        print("YES")
    else:
        print("NO")

Python: def f(a,b,c,d,e,f,g,h):return ((a-c)*(f-b)+(b-d)*(a-e))*((a-c)*(h-b)+(b-d)*(a-g))
while 1:
    try:x1,y1,x2,y2,x3,y3,xp,yp=map(float,input().split())
    except:break
    x=(x1+x2+x3)/3
    y=(y1+y2+y3)/3
    print(['YES','NO'][f(x1,y1,x2,y2,xp,yp,x,y)<0 or f(x1,y1,x3,y3,xp,yp,x,y)<0 or f(x2,y2,x3,y3,xp,yp,x,y)<0])

Python: 
x1,y1,x2,y2,x3,y3,xp,yp=[float(p) for p in input().split()]

x_vector_1to2=x2-x1;
y_vector_1to2=y2-y1;
x_vector_1to3=x3-x1;
y_vector_1to3=y3-y1;
x_vector_p=xp-x1;
y_vector_p=yp-y1;

def renritu(p,q,r,s,t,u):  # renritu(p,q,r,s,t,u) px + qy = r  sx+ty=u
    a=p; b=q; c=r; d=s; e=t; f=u;
    a1=a*d; b1=b*d; c1=c*d; d1=d*a; e1=e*a; f1=f*a;
    res_y=b1-e1;
    if res_y != 0 :
        res_y =(c1-f1)/res_y;
        res_x =(c-b*res_y)/a;
        return(res_x,res_y)
    else:
        return(-1,-1)
    
res=renritu(x_vector_1to2,x_vector_1to3,x_vector_p,y_vector_1to2,y_vector_1to3,y_vector_p)
if res[0]>0 and res[1]>0 and res[0]+res[1]<1:
    print("YES")
else:
    print("NO")

Python: def vec(s,t):
    return [t[0]-s[0], t[1]-s[1]]

def area(a,b):
    return a[0]*b[1] - a[1]*b[0]

while True:
    try:
        l = [float(x) for x in input().split()]

        a = [l[0],l[1]]
        b = [l[2],l[3]]
        c = [l[4],l[5]]
        p = [l[6],l[7]]

        x = area(vec(p,a),vec(p,b))
        y = area(vec(p,b),vec(p,c))
        z = area(vec(p,c),vec(p,a))

        if (x<0 and y<0 and z<0) or (x>0 and y>0 and z>0):
            print('YES')
        else:
            print('NO')
    except:
        break

Python: import sys

def sameside(x1, y1, x2, y2, ax, ay, bx, by):
    if x1 != x2:
        aupper = (ay > (y1-y2)/(x1-x2) * (ax-x1) + y1)
        bupper = (by > (y1-y2)/(x1-x2) * (bx-x1) + y1)
    else:
        aupper = ax < x1
        bupper = bx < x1
    return aupper == bupper

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

Python: import math
import sys


def get_triangle_area(x1, y1, x2, y2, x3, y3):
    l1 = math.sqrt(abs(x1-x2)**2+abs(y1-y2)**2)
    l2 = math.sqrt(abs(x2-x3)**2+abs(y2-y3)**2)
    l3 = math.sqrt(abs(x3-x1)**2+abs(y3-y1)**2)
    s = (l1+l2+l3)/2
    return math.sqrt(s*(s-l1)*(s-l2)*(s-l3))


for l in sys.stdin:
    x1, y1, x2, y2, x3, y3, xp, yp = map(float, l.split())
    s1 = get_triangle_area(x1, y1, x2, y2, x3, y3)
    s2 = get_triangle_area(xp, yp, x1, y1, x2, y2)
    s2 += get_triangle_area(xp, yp, x2, y2, x3, y3)
    s2 += get_triangle_area(xp, yp, x3, y3, x1, y1)
    print("YES" if round(s1, 5) == round(s2, 5) else "NO")

Python: import math
while True:
    try:
        x1, y1, x2, y2, x3, y3, xp, yp = map(float, input().split())
    except:
        break
    x = [x1, x2, x3, x1]
    y = [y1, y2, y3, y1]
    x = list(map(lambda i: i - xp, x))
    y = list(map(lambda i: i - yp, y))
    s = lambda a1, a2, b1, b2: abs(a1 * b2 - a2 * b1)
    S3 = sum(s(x[i], y[i], x[i + 1], y[i + 1]) for i in range(3))
    S = s(x[1] - x[0], y[1] - y[0], x[2] - x[0], y[2] - y[0])
    if S3 == S:
        print('YES')
    else:
        print('NO')

Python: # ２点(a, b) (c, d)を通る直線の傾きと切片を返す
def func(a, b, c, d):
    k = (d - b) / (c - a)
    h = d - k * c
    return k, h


# ２点と通る直線のf(x)を返す
def fx(a, b, c, d, x):
    k, h = func(a, b, c, d)
    return k * x + h


def main():
    import sys
    for dataset in sys.stdin:
        ans = 'NO'
        try :
            a, b, c, d, e, f, px, py = map(float, dataset.split())
        except:
            break
        T = [(a, b), (c, d), (e, f)]
        T.sort(key=lambda x: (x[0], x[1]))
        a, b, c, d, e, f = T[0][0], T[0][1], T[1][0], T[1][1], T[2][0], T[2][1]
        # 共通なxを持つ２点が存在するか判定し、する場合
        if a == c:
            if  a < px and fx(a, b, e, f, px) < py and fx(c, d, e, f, px) > py:
                ans = 'YES'
        elif c == e:
            if px < e and fx(a, b, c, d, px) < py and fx(a, b, e, f, px) > py:
                ans = 'YES'
        else:  # ３点において共通のxを持たない場合
            if fx(a, b, e, f, c) < d:  # 中間点が残り２点を通る直線より上にあるケース
                if fx(a, b, c, d, px) > py and fx(c, d, e, f, px) > py and fx(a, b, e, f, px) < py:
                    ans = 'YES'
            else:
                if fx(a, b, c, d, px) < py and fx(c, d, e, f, px) < py and fx(a, b, e, f, px) > py:
                    ans = 'YES'

        print(ans)


if __name__ == '__main__':
    main()