Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func check(x, y, x1, y1, x2, y2 float64) float64 {
	return (x2-x1)*y - (y2-y1)*x + x1*y2 - x2*y1
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	a := make([]float64, 8)
	for scanner.Scan() {
		info := strings.Split(scanner.Text(), ",")
		for j := 0; j < 8; j++ {
			a[j], _ = strconv.ParseFloat(info[j], 64)
		}
		if check(a[0], a[1], a[2],a[3], a[6], a[7])*check(a[4], a[5], a[2], a[3], a[6], a[7]) < 0 && check(a[6], a[7], a[0], a[1], a[4], a[5])*check(a[2],a[3], a[0], a[1], a[4], a[5]) < 0 {
			fmt.Println("YES")	
		} else {
			fmt.Println("NO")
		}
	}
}

C++: #include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <string>
#include <stack>
#include <iomanip>
#include <numeric>
#include <queue>
#include <climits>
#include <complex>
#include <cmath>
#include <map>
using namespace std;
using ll = long long;
#define MOD 1000000007
#define INF 1LL << 59
using Point = complex<double>;
#define curr(P, i) P[i]
#define next(P, i) P[(i + 1) % P.size()]
#define prev(P, i) P[(i - 1 + P.size()) % P.size()]

istream &operator>>(istream &is, Point &p)
{
    double a, b;
    is >> a >> b;
    p = Point(a, b);
    return is;
}

const double EPS = 1e-12, PI = acos(-1);
inline bool eq(double a, double b) { return fabs(b - a) < EPS; }

//二つのスカラーが等しいか
#define EQ(a, b) (abs((a) - (b)) < EPS)
//二つのベクトルが等しいか
#define EQV(a, b) (EQ((a), real(), (b).real()) && EQ((a), imag(), (b).imag()))

namespace std
{
bool operator<(const Point &a, const Point &b)
{
    return a.real() != b.real() ? a.real() < b.real() : a.imag() < b.imag();
}
} // namespace std

struct Line
{
    Point a, b;
    Line() {}
    Line(Point a, Point b) : a(a), b(b) {}
    //a, bはそれぞれ座標を指す. これより一つの「line」に対して二個の点を持つことになる
    Line(double A, double B, double C) // Ax + By = C
    {
        if (eq(A, 0))
            a = Point(0, C / B), b = Point(1, C / B);
        else if (eq(B, 0))
            b = Point(C / A, 0), b = Point(C / A, 1);
        else
            a = Point(0, C / B), b = Point(C / A, 0);
    }

    friend ostream &operator<<(ostream &os, Line &p)
    {
        return os << p.a << " to " << p.b;
    }

    friend istream &operator>>(istream &is, Line &a)
    {
        return is >> a.a >> a.b;
    }
};

struct Segment : Line
{
    Segment() {}

    Segment(Point a, Point b) : Line(a, b) {}
};

struct Circle
{
    Point p;
    double r;

    Circle() {}

    Circle(Point p, double r) : p(p), r(r) {}
};

using Points = vector<Point>;
using Polygon = vector<Point>;
using Segments = vector<Segment>;
using Lines = vector<Line>;
using Circles = vector<Circle>;

double dot(const Point a, const Point b)
{
    return real(a) * real(b) + imag(a) * imag(b);
}

double cross(const Point a, const Point b)
{
    return real(a) * imag(b) - imag(a) * real(b);
}
int ccw(const Point &a, Point b, Point c)
{
    b = b - a, c = c - a;
    if (cross(b, c) > EPS)
        return +1; // "COUNTER_CLOCKWISE"
    if (cross(b, c) < -EPS)
        return -1; // "CLOCKWISE"
    if (dot(b, c) < 0)
        return +2; // "ONLINE_BACK"
    if (norm(b) < norm(c))
        return -2; // "ONLINE_FRONT"
    return 0;      // "ON_SEGMENT"
}
Polygon convex_hull(Polygon &p)
{
    int n = (int)p.size(), k = 0;
    if (n <= 2)
        return p;
    sort(p.begin(), p.end());
    vector<Point> ch(n * 2);

    for (int i = 0; i < n; ch[k++] = p[i++])
    {
        while (k >= 2 && cross(ch[k - 1] - ch[k - 2], p[i] - ch[k - 1]) < 0)
            --k;
    }

    for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = p[i--])
    {
        while (k >= t && cross(ch[k - 1] - ch[k - 2], p[i] - ch[k - 1]) < 0)
            --k;
    }
    ch.resize(k - 1);
    return ch;
}

bool is_Convex(const Polygon &g)
{
    for (int i = 0; i < (int)g.size(); ++i)
    {
        if (ccw(prev(g, i), curr(g, i), next(g, i)) == -1)
            return false;
    }
    return true;
}

int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    cout << fixed << setprecision(3);

    double x1, x2, x3, x4, y1, y2, y3, y4;
    while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4) != EOF)
    {
        complex<double> p1(x1, y1), p2(x2, y2), p3(x3, y3), p4(x4, y4);

        Polygon v;
        v.push_back(p1);
        v.push_back(p2);
        v.push_back(p3);
        v.push_back(p4);
        Polygon v2 = convex_hull(v);
        if (v.size() == v2.size())
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }

    return 0;
}

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

double eps = 1e-10;

class Point {
public:
	double x, y;
	
	Point(double x = 0, double y = 0) : x(x), y(y) {}
	
	Point operator + (const Point& p) {
		return Point(x + p.x, y + p.y);
	}
	Point operator - (const Point& p) {
		return Point(x - p.x, y - p.y);
	}
	Point operator * (const double& a) {
		return Point(x * a, y * a);
	}
	Point operator / (const double& a) {
		return Point(x / a, y / a);
	}
	
	bool operator < (const Point& p) const {
		return x != p.x ? x < p.x : y < p.y;
	}
	bool operator == (const Point& p) const {
		return fabs(x - p.x) < eps && fabs(y - p.y) < eps;
	}
	
	double abs() {
		return sqrt(norm());
	}
	double norm() {
		return x * x + y * y;
	}
	
};

class Circle {
public:
	Point c;
	double r;
	Circle(Point c = Point(), double r = 0.0) : c(c), r(r) {}
};

typedef Point Vector;

struct Segment {
	Point p1, p2;
	Segment(Point p1, Point p2) : p1(p1), p2(p2) {}
};

typedef Segment Line;

// ????????????
bool equals(const double& a, const double& b) {
	return fabs(a - b) < eps;
}

// ??????
double dot(const Vector& a, const Vector& b){
	return a.x * b.x + a.y * b.y;	
}

// ??????
double cross(const Vector& a, const Vector& b){
	return a.x * b.y - a.y * b.x;
}

class Triangle {
public:
	Point p1, p2, p3; // ??????
	Vector v1, v2, v3; // ??????????????????
	double e1, e2, e3; // ????????§??????
	double a1, a2, a3; // ?§????(????????¢???)
	
	Triangle(Point a, Point b, Point c) : p1(a), p2(b), p3(c) {
		v1 = p3 - p2; v2 = p3 - p1; v3 = p2 - p1;
		e1 = v1.abs(); e2 = v2.abs(); e3 = v3.abs();
		a1 = law_of_cosines(e1, e2, e3); a2 = law_of_cosines(e2, e1, e3);
		a3 = law_of_cosines(e3, e2, e1);
	}
	
	// ????????????(?????????:?§????)
	double law_of_cosines(const double& a, const double& b, const double& c) { 
		return acos((b * b + c * c - a * a) / (2.0 * b * c)) * 180 / M_PI;
	}
	
	// ?????\????????????
	double calc_radius_circumcenter() {
		return e1 / (2.0 * sin(a1));
	}
	// ?????????????????????
	Vector calc_vec_circumcenter() {
		return (v1 * sin(2.0 * a1) + v2 * sin(2.0 * a2) + v3 * sin(2.0 * a3))
		       / (sin(2.0 * a1) + sin(2.0 * a2) + sin(2.0 * a3));
	}
	
	// ???????????§?¨?
	Point calc_p_circumcenter() {
		return Point((p1.x * sin(2.0 * a1) + p2.x * sin(2.0 * a2) + p3.x * sin(2.0 * a3))
		             / (sin(2.0 * a1) + sin(2.0 * a2) + sin(2.0 * a3)),
		             (p1.y * sin(2.0 * a1) + p2.y * sin(2.0 * a2) + p3.y * sin(2.0 * a3))
		             / (sin(2.0 * a1) + sin(2.0 * a2) + sin(2.0 * a3)));
	}
};

int main() {
	double x1, x2, x3, x4, y1, y2, y3, y4;
	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4) != EOF){
		Triangle t1 = Triangle(Point(x1, y1), Point(x2, y2), Point(x4, y4));
		Triangle t2 = Triangle(Point(x2, y2), Point(x1, y1), Point(x3, y3));
		Triangle t3 = Triangle(Point(x3, y3), Point(x2, y2), Point(x4, y4));
		Triangle t4 = Triangle(Point(x4, y4), Point(x3, y3), Point(x1, y1));
		//cout << t1.a1 << " " << t2.a1 << " " << t3.a1 << " " << t4.a1 << endl;
		if(t1.a1 > 90 || t2.a1 > 90 || t3.a1 > 90 || t4.a1 > 90)
			cout << "NO" << endl;
		else
			cout << "YES" << endl;
	}
	return 0;
}