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")
                        }
                }
        }
}

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

int main(void){
ツ　ツ　double x1, y1, x2, y2, x3, y3, px, py;
ツ　ツ　double a, b, c, ap, bp, cp;
ツ　ツ　double tmp;
ツ　ツ　double s2, sa2, sb2, sc2;
ツ　ツ　double s, sa, sb, sc;

ツ　ツ　while(cin>>x1>>y1>>x2>>y2>>x3>>y3>>px>>py){
ツ　ツ　ツ　ツ　a = sqrt(fabs((x2-x3) * (x2-x3) + (y2-y3) * (y2-y3)));
ツ　ツ　ツ　ツ　b = sqrt(fabs((x1-x3) * (x1-x3) + (y1-y3) * (y1-y3)));
ツ　ツ　ツ　ツ　c = sqrt(fabs((x1-x2) * (x1-x2) + (y1-y2) * (y1-y2)));
ツ　ツ　ツ　ツ　ap = sqrt(fabs((x1-px) * (x1-px) + (y1-py) * (y1-py)));
ツ　ツ　ツ　ツ　bp = sqrt(fabs((x2-px) * (x2-px) + (y2-py) * (y2-py)));
ツ　ツ　ツ　ツ　cp = sqrt(fabs((x3-px) * (x3-px) + (y3-py) * (y3-py)));
ツ　ツ　ツ　ツ　
ツ　ツ　ツ　ツ　tmp = (a+b+c) / 2;
ツ　ツ　ツ　ツ　s2 = tmp * (tmp-a) * (tmp-b) * (tmp-c);
ツ　ツ　ツ　ツ　s = sqrt(s2);
ツ　ツ　ツ　ツ　tmp = (a+bp+cp) / 2;
ツ　ツ　ツ　ツ　sa2 = tmp * (tmp-a) * (tmp-bp) * (tmp-cp);
ツ　ツ　ツ　ツ　sa = sqrt(sa2);
ツ　ツ　ツ　ツ　tmp = (b+ap+cp) / 2;
ツ　ツ　ツ　ツ　sb2 = tmp * (tmp-b) * (tmp-ap) * (tmp-cp);
ツ　ツ　ツ　ツ　sb = sqrt(sb2);
ツ　ツ　ツ　ツ　tmp = (c+ap+bp) / 2;
ツ　ツ　ツ　ツ　sc2 = tmp * (tmp-c) * (tmp-ap) * (tmp-bp);
ツ　ツ　ツ　ツ　sc = sqrt(sc2);
ツ　ツ　ツ　ツ　if(fabs(sa+sb+sc-s) < ie-9) cout << "YES" << endl;
ツ　ツ　ツ　ツ　else cout << "NO" << endl;
ツ　ツ　}
ツ　ツ　return 0;
}

C++: #include<iostream>
#include<stdlib.h>
#include<math.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define pb(a) push_back(a)
#define all(a) (a).begin(), (a),end()
#define debug(x) cout << "debug " << x << endl;
using namespace std;

double dist(double x1, double y1, double x2, double y2){
    return sqrt( ((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)) );
}

double triangleArea(double x, double y, double z){
    return (y * z * sin( acos( (y * y +  z * z - x * x) / (2 * y * z) ) )) / 2;
}

double inputXY(double x1, double y1, double x2, double y2, double x3, double y3){
    double x, y ,z;
    x = dist(x1, y1, x2, y2);
    y = dist(x2, y2, x3, y3);
    z = dist(x3, y3, x1, y1);
    return triangleArea(x, y, z);
}

int main(){
    double x1, y1, x2, y2, x3, y3, xp, yp;
    double allArea, area12, area23, area31;
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp;
    allArea = inputXY(x1, y1, x2, y2, x3, y3);
    area12 = inputXY(xp, yp, x2, y2, x1, y1);
    area23 = inputXY(x2, y2, x3, y3, xp, yp);
    area31 = inputXY(x3, y3, x1, y1, xp, yp);

    if(abs(allArea - (area12 + area23 + area31)) < 0.000000001) cout << "YES" << endl;
    else cout << "NO" << endl;

}

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

typedef complex<double> Pt;
double cross(const Pt &a, const Pt &b) { return imag(conj(a)*b); }

int main()
{
    double x1, x2, x3, y1, y2, y3, xp, yp;
    while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp)
    {
        Pt a = Pt(x1, y1), b = Pt(x2, y2), c = Pt(x3, y3), p = Pt(xp, yp);
        a -= p; b -= p; c -= p;
        cout << (cross(a, b) >= 0 && cross(b, c) >= 0 && cross(c, a) >= 0 ? "YES" : "NO") << endl;
    }
}

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

int edinton(int i,int j, int k);
double cross(double *a,double *b);

int main(){
    double p[4][3],z[3];
    while(1){
        int sum=0;
        for(int l=0;l<4;l++){
            cin >> p[l][0] >> p[l][1];
            p[l][2]=0;
        }
        for(int i=0;i<3;i++){
            z[i]=cross(p[i],p[3]);
            z[i]=z[i]/fabs(z[i]);
            sum+=z[i];
        }
        if(sum==3) cout << "YES" << endl;
        else{
            cout << "NO" << endl;
            break;
        }
    }
    return 0;
}

int edinton(int i,int j, int k){
    int a=1,b=2,c=3,d;
    for(int l=0;l<3;l++){
        if(i==a&&j==b&&k==c) return 1;
        d=c;c=b;b=a;a=d;
    }
    a=3; b=2; c=1;
    for(int l=0;l<3;l++){
        if(i==a&&j==b&&k==c) return -1;
        d=c;c=b;b=a;a=d;
    }
    return 0;
}
double cross(double *a,double *b){
    double c=0;
    for(int i=1;i<=3;i++)
        for(int j=1;j<=3;j++)
            for(int k=1;k<=3;k++){
                c+=edinton(i, j, k)*a[j]*b[k];
            }
    return c;
}

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

double check(double x1, double y1, double x2, double y2, double x3, double y3){
	double ab = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
	double bc = sqrt((x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3));
	double ca = sqrt((x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1));
	double s = (ab + bc + ca) * 0.5;
	double S = sqrt(s * (s - ab) * (s - bc) * (s - ca));
	return S;
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	double x1, y1, x2, y2, x3, y3, xp, yp;
	while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp){
	
	double abc = check(x1, y1, x2, y2, x3, y3);
	double abp = check(x1, y1, x2, y2, xp, yp);
	double bcp = check(x2, y2, x3, y3, xp, yp);
	double cap = check(x3, y3, x1, y1, xp, yp);
	
	double var = abc - (abp + bcp + cap);
	if(var <= 0.001 && var >= -0.001){
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
	}
	
	return 0;
}

C++: 0.0 0.0 1.0 4.0 5.0 3.0 -1.0 3.0

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

int main()
{
	double x1, x2, x3, y1, y2, y3, px, py;
	while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> px >> py) {
		double j1 = (x1 - x2)*(py - y2) - (px - x2)*(y1 - y2),
		       j2 = (x3 - x1)*(py - y1) - (px - x1)*(y3 - y1),
			   j3 = (x2 - x3)*(py - y3) - (px - x3)*(y2 - y3);
		if ((j1 < 0 && j2 < 0 && j3 < 0) || (j1 > 0 && j2 > 0 && j3 > 0))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#include <vector>
using namespace std;
double x_1, x_2, x_3, y_1, y_2, y_3, x_p, y_p, c;
int n,hasil;
int main(){
	while(cin >> x_1 >> y_1 >> x_2 >> y_2 >> x_3 >> y_3 >> x_p >> y_p){
		hasil = 0;
		if((x_3*y_2)-(x_3*y_1)-(x_1*y_2) > (x_2*y_3)-(x_1*y_3)-(x_2*y_1)){
			if((x_p*y_2)-(x_p*y_1)-(x_1*y_2) > (x_2*y_p)-(x_1*y_p)-(x_2*y_1)){
				hasil++;
			}
		}
		else if((x_3*y_2)-(x_3*y_1)-(x_1*y_2) < (x_2*y_3)-(x_1*y_3)-(x_2*y_1)){
			if((x_p*y_2)-(x_p*y_1)-(x_1*y_2) < (x_2*y_p)-(x_1*y_p)-(x_2*y_1)){
				hasil++;
			}
		}
		if((x_2*y_3)-(x_2*y_1)-(x_1*y_3) > (x_3*y_2)-(x_1*y_2)-(x_3*y_1)){
			if((x_p*y_3)-(x_p*y_1)-(x_1*y_3) > (x_3*y_p)-(x_1*y_p)-(x_3*y_1)){
				hasil++;
			}
		}
		else if((x_2*y_3)-(x_2*y_1)-(x_1*y_3) < (x_3*y_2)-(x_1*y_2)-(x_3*y_1)){
			if((x_p*y_3)-(x_p*y_1)-(x_1*y_3) < (x_3*y_p)-(x_1*y_p)-(x_3*y_1)){
				hasil++;
			}
		}
		if((x_1*y_3)-(x_1*y_2)-(x_2*y_3) > (x_3*y_1)-(x_2*y_1)-(x_3*y_2)){
			if((x_p*y_3)-(x_p*y_2)-(x_2*y_3) > (x_3*y_p)-(x_2*y_p)-(x_3*y_2)){
				hasil++;
			}
		}
		if((x_1*y_3)-(x_1*y_2)-(x_2*y_3) < (x_3*y_1)-(x_2*y_1)-(x_3*y_2)){
			if((x_p*y_3)-(x_p*y_2)-(x_2*y_3) < (x_3*y_p)-(x_2*y_p)-(x_3*y_2)){
				hasil++;
			}
		}
		if(hasil == 3)
			cout << "YES\n";
		else
			cout << "NO\n";
	}
	return 0;
}