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: import math


class Triangle:
    def __init__(self, x1, y1, x2, y2, x3, y3):
        self.x1 = x1
        self.x2 = x2
        self.x3 = x3
        self.y1 = y1
        self.y2 = y2
        self.y3 = y3
        self.a = math.sqrt((x1-x2) ** 2 + (y1 - y2) ** 2)
        self.b = math.sqrt((x2-x3) ** 2 + (y2 - y3) ** 2)
        self.c = math.sqrt((x1-x3) ** 2 + (y1 - y3) ** 2)

    def get_acos_a(self):
        val = (-self.a ** 2 + self.b ** 2 + self.c ** 2) / (2 * self.b * self.c)
        return math.acos(val)


while(1):

    try:
        x1, y1, x2, y2, x3, y3, xp, yp = list(map(float, input().split()))
        t1 = Triangle(x1, y1, x2, y2, xp, yp)
        t2 = Triangle(x2, y2, x3, y3, xp, yp)
        t3 = Triangle(x3, y3, x1, y1, xp, yp)

        if 6.283 <= t1.get_acos_a() + t2.get_acos_a() + t3.get_acos_a() <= 6.284:
            print("YES")
        else:
            print("NO")

    except:
        break

Python: while True :
    try :
        x1, y1, x2, y2, x3, y3, xp, yp = map(float, input().split())
        
        # 三角形の回転方向で判定する
        # 三角形PAB, PBC, PCAの回転が全て同じならば、
        # 点Pは三角形ABC内に存在する
        # 三角形ABCの回転の方向は、
        # x1(y2 - y3) + x2(y3 - y1) + x3(y1 - y2)
        # の符号で判断できる
        # 正なら左周り、負なら右回り
        
        a = xp * (y1 - y2) + x1 * (y2 - yp) + x2 * (yp - y1)
        b = xp * (y2 - y3) + x2 * (y3 - yp) + x3 * (yp - y2)
        c = xp * (y3 - y1) + x3 * (y1 - yp) + x1 * (yp - y3)
            
        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: import math
def helon(x1, y1, x2, y2, x3, y3):
    a = math.sqrt((x2 - x1)**2 + (y2 - y1)**2)
    b = math.sqrt((x3 - x2)**2 + (y3 - y2)**2)
    c = math.sqrt((x1 - x3)**2 + (y1 - y3)**2)
    s = (a + b + c) / 2
    return(math.sqrt(s * (s - a) * (s - b) * (s - c)))
    
while(True):
    try:
        input = map(float, raw_input().split())
        S = []
        S.append(helon(input[0], input[1], input[2], input[3], input[4], input[5]))
        S.append(helon(input[0], input[1], input[2], input[3], input[6], input[7]))
        S.append(helon(input[0], input[1], input[4], input[5], input[6], input[7]))
        S.append(helon(input[2], input[3], input[4], input[5], input[6], input[7]))
        if(math.fabs(S[0] - S[1] - S[2] - S[3]) < 1e-7):
            print("YES")
        else:
            print("NO")
    except Exception:
        break

C++: #include <iostream>
using namespace std;
double x[4],y[4],px,py,ax,ay,bx,by;
int main()
{
	while(true)
	{
		for(int i = 1;i<=3;i++){cin >> x[i];cin >> y[i];}
		if(cin.eof())break;
		cin >> px;
		cin >> py;
		double m,n;
		ax = x[2]-x[1];
		ay = y[2]-y[1];
		bx = x[3]-x[1];
		by = y[3]-y[1];
		double det = ax*by-ay*bx;
		m = (by*px-bx*py)/det;
		n = (-ay*px+ax*py)/det;
		if(m>0 && m <1&& n > 0 && n < 1&& (m+n) < 1) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;

class Point {
public:
  double x, y;
  Point(double x=0, double y=0) : x(x), y(y) {}
  Point operator -(Point p) {
    return Point(x-p.x, y-p.y);
  }
};
typedef Point Vector;

double cross(Vector a, Vector b) {
  return a.x*b.y - a.y*b.x;
}
Point p[3];
Point q;

bool solve() {
  int dir;
  double tmp;
  for(int i = 0; i < 3; i++) {
    int a = i;
    int b = (i+1)%3;

    tmp = cross(p[b]-p[a], q-p[a]);
    if(i == 0) {
      if(tmp > 0) dir = 1;
      else        dir = -1;
    } else {
      switch(dir) {
      case 1:
	if(!(tmp > 0)) return false;
	break;
      case -1:
	if(!(tmp < 0)) return false;
	break;
      }
    }
  }
  return true;
}

int main() {
  bool loop = true;
  while(1) {
    for(int i = 0; i < 3; i++) {
      cin >> p[i].x >> p[i].y;
      if(cin.eof()) {
	loop = false;
	break;
      }
    }
    if(!loop) break;
    cin >> q.x >> q.y;

    if(solve()) cout << "YES" << endl;
    else        cout << "NO" << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
  double x1,x2,x3,y1,y2,y3,x,y;
  double a,b,c,s,ans;
  while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&x2,&x3,&y1,&y2,&y3,&x,&y)!=EOF){
    a=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
    b=sqrt((x3-x1)*(x3-x1)+(y3-y1)*(y3-y1));
    c=sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
    if(a>x&&b>x&&c>x&&y<a&&y<b&&y<c){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
  return 0;
}