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 <complex>
#include <map>
#include <vector>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define x(a) (a).real()
#define y(a) (a).imag()
typedef long double D;
typedef bool B;
typedef complex<D> P;   //点
typedef complex<D> V;   //ベクトル
typedef pair<P,P>  L;   //直線
typedef pair<P,D>  C;   //円
typedef vector<P>  Pol; //多角形

//変数名定義
const D INF = 1e100;
const D EPS = 1e-8;
const D PI = acos(-1);

template<class T> bool operator==(T a, T b){return abs(a - b )< EPS;}
template<class T> int sig(T r) {return (r==0||r==-0) ? 0 : r > 0 ? 1 : -1;}

  bool operator < (const P& a, const P& b) {
    return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
  }

// ベクトルaの絶対値を求める
// D Length = abs(a);

// 2点a,b間の距離を求める
// D Distance = abs(a-b); 

// 内積 (Inner Product) : a・b = |a||b|cosθ
D IP(V a, V b) {
	return (a.real() * b.real() + a.imag() * b.imag());
}

// 外積 (Exterior Product) : a×b = |a||b|sinθ
D EP(V a, V b) {
	return (a.real() * b.imag() - a.imag() * b.real());
}

// 2直線の直交判定 : a⊥b <=> IP(a, b) = 0
B IsVecular(P a1, P a2, P b1, P b2) {
	return IP(a1-a2, b1-b2)==0.0;
}

// 2直線の平行判定 : a//b <=> EP(a, b) = 0
B IsParallel(P a1, P a2, P b1, P b2) {
	return EP(a1-a2, b1-b2)== 0.0;
}


// 点と直線の距離 (Distance of Point and Line)  //l1の構造 x座標 first<second y座標 first>second 右上 正 左下 負 一致の
D  DPL(P p,L l){
	V v1=(p-l.first);
	V v2=(l.second-l.first);
	return EP(v1,v2)/abs(v1);
}

// 三角形の領域判定 Teritory of Triangle 内部のみ
B TT(P p1,P p2,P p3,P p){
	L l1,l2,l3;
	l1=make_pair(p2,p3);
	l2=make_pair(p3,p1);
	l3=make_pair(p1,p2);

	if(sig(DPL(p1,l1))!=sig(DPL(p,l1)))
		return false;
	else if(sig(DPL(p2,l2))!=sig(DPL(p,l2)))
		return false;
	else if(sig(DPL(p3,l3))!=sig(DPL(p,l3)))
		return false;
	else
		return true;
}


//変数名 = 型 代入したいもの
//example : v1 = V(5.0,-3.0) p1=P(0.0,4.0)
int main(void){
	while(true){
		if(cin.eof())
			break;
		P point[4];	
		rep(j,4)
		cin >> point[j].real() >> point[j].imag();
		if (TT(point[0],point[1],point[2],point[3]))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#include <chrono>
using namespace std;

using _i64 = int64_t;
using _u64 = uint64_t;
using _f64 = double;

#define endl "\n"

#define _for(i, start, end) for(_i64 i = (_i64)start; i < (_i64)end; ++i)
#define _rep(i, number) _for(i, 0, number)
#define _foreach(e, data) for(auto& e : data)
#define _all(data) data.begin(), data.end()

template<typename type>
_i64 _size(const type& data) { return static_cast<_i64>(data.size()); }
template<typename type, size_t size>
_i64 _size(const type (&)[size]) { return static_cast<_i64>(size); }

enum _flag : bool { able = true, disable = false };

struct _time {
    _time(_flag flag) { check = flag; if(!check) { return; } gettime(start); }
    ~_time() {
        if(!check) { return; }; gettime(end);
        _i64 elapse = chrono::duration_cast<chrono::milliseconds>(end - start).count();
        cout << endl << "Time: " << elapse << " ms" << endl;
    }
    private:
    using _timer = chrono::time_point<chrono::system_clock>;
    _timer start, end; bool check;
    void gettime(_timer& time) { time = chrono::system_clock::now(); }
};

struct _ini { _ini() { ios::sync_with_stdio(false); cin.tie(nullptr); } } _ini;

struct _vector2 {
    _f64 x, y;
    _vector2 operator+(const _vector2& rhs) const {
        _vector2 temp;
        temp.x = x + rhs.x; temp.y = y + rhs.y;
        return temp;
    }
    _vector2 operator-(const _vector2& rhs) const {
        _vector2 temp;
        temp.x = x - rhs.x; temp.y = y - rhs.y;
        return temp;
    }
};

int main() {
    {
        _time time(disable);
        _vector2 OA, OB, OC, OP, AP, BP, CP; bool ans1, ans2;
        auto outer2 = [](_vector2 v1, _vector2 v2) -> _f64 { return v1.x * v2.y - v1.y * v2.x; };
        while(cin >> OA.x >> OA.y >> OB.x >> OB.y >> OC.x >> OC.y >> OP.x >> OP.y) {
            AP = OP - OA; BP = OP - OB; CP = OP - OC;
            ans1 = outer2(AP, BP) > 0 && outer2(BP, CP) > 0 && outer2(CP, AP) > 0;
            ans2 = outer2(AP, BP) < 0 && outer2(BP, CP) < 0 && outer2(CP, AP) < 0;
            cout << (ans1 || ans2 ? "YES" : "NO") << endl;
        }
    }
    return 0;
}

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

typedef complex<double> P;

int main(void){
  double x1, x2, x3, y1, y2, y3, xp, yp;
  while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp){
    P a1(x1 - x3, y1 - y3), b1(x2 - x3, y2 - y3), c1(xp - x3, yp - y3);
    P a2(x1 - x2, y2 - y2), b2(x3 - x2, y3 - y2), c2(xp - x2, yp - y2);
    P a3(x3 - x1, y3 - y1), b3(x2 - x1, y2 - y1), c3(xp - x1, yp - y1);
    
    double area11, area12, area21, area22, area31, area32;
    area11 = (a1 * conj(c1)).imag();
    area12 = (b1 * conj(c1)).imag();
    area21 = (a2 * conj(c2)).imag();
    area22 = (b2 * conj(c2)).imag();
    area31 = (a3 * conj(c3)).imag();
    area32 = (b3 * conj(c3)).imag();

    if(((area11 > 0 && area12 < 0) || (area11 < 0  && area12 > 0))
        && ((area21 > 0 && area22 < 0) || (area21 < 0 && area22 > 0))
        && ((area31 > 0 && area32 < 0) || (area31 < 0 && area32 > 0))){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
  return 0;
}

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

constexpr double pi = 3.14159265358979323846;

struct vec2d
{
    double x, y;

    double dot(vec2d const & other)
    {
        return x * other.x + y * other.y;
    }

    double norm()
    {
        return sqrt(x * x + y * y);
    }
};

int main()
{
    double x1, y1, x2, y2, x3, y3, xp, yp;
    vec2d v1p, v2p, v3p;
    vec2d v12, v23, v31;
    double a121p, a232p, a313p;
    vec2d v32, v21, v13;
    double a323p, a212p, a131p;

    while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
        v1p = vec2d{xp - x1, yp - y1};
        v2p = vec2d{xp - x2, yp - y2};
        v3p = vec2d{xp - x3, yp - y3};

        v12 = vec2d{x2 - x1, y2 - y1};
        v23 = vec2d{x3 - x2, y3 - y2};
        v31 = vec2d{x1 - x3, y1 - y3};

        v32 = vec2d{x2 - x3, y2 - y3};
        v21 = vec2d{x1 - x2, y1 - y2};
        v13 = vec2d{x3 - x1, y3 - y1};

        a121p = acos(v12.dot(v1p) / (v12.norm() * v1p.norm()));
        a232p = acos(v23.dot(v2p) / (v23.norm() * v2p.norm()));
        a313p = acos(v31.dot(v3p) / (v31.norm() * v3p.norm()));

        a323p = acos(v32.dot(v3p) / (v32.norm() * v3p.norm()));
        a212p = acos(v21.dot(v2p) / (v21.norm() * v2p.norm()));
        a131p = acos(v13.dot(v1p) / (v13.norm() * v1p.norm()));

        if (a121p <= pi / 2 && a232p <= pi / 2 && a313p <= pi / 2 && a323p <= pi / 2 && a212p <= pi / 2 && a131p <= pi / 2) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}