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

using T = long double;
const T INF = 1e10;
const T EPS = 1e-10;
const T PI = acos(-1.0);
T torad(int deg) {return (T)(deg) * PI / 180;}
T todeg(T ang) {return ang * 180 / PI;}
template <typename T> inline bool eq(T p, T q) { return abs(p - q) < EPS; }
inline int sgn(T x) { return (EPS < x) - (x < -EPS); }

/* Point */
using Point = complex<T>;
#define x real()
#define y imag()
inline T dot(Point v, Point w) { return (conj(v) * w).x; }
inline T cross(Point v, Point w) { return (conj(v) * w).y; }
inline T orient(Point a, Point b, Point c) { return cross(b - a, c - a); }
inline Point unit(Point v) { return v / abs(v); }
inline Point rot(Point p, T a) { return p * polar(T(1), a); }
inline Point rot90(Point p) { return {-p.y, p.x}; }
bool cmpX(const Point& a, const Point& b) { return a.x != b.x ? a.x < b.x : a.y < b.y; }
bool cmpY(const Point& a, const Point& b) { return a.y != b.y ? a.y < b.y : a.x < b.x; }
namespace std {
    istream& operator>>(istream &is, Point &p) { T xx, yy; is >> xx >> yy; p = Point(xx, yy); return is; }
    bool operator < (const Point &a, const Point &b) { return cmpX(a, b); }
}

/* Line */
struct Line : array<Point, 2> {
    Point v; T c;
    Line() = default;
    explicit Line(Point a, Point b) : array<Point, 2>({a, b}), v(b - a), c(cross(v, a)) {}
    T side(Point p) { return cross(v, p) - c; }
    Point proj(Point p) { return p - rot90(v) * side(p) / norm(v); }
    Point refl(Point p) { return p - rot90(v) * T(2) * side(p) / norm(v); }
    bool onLine(Point p) { return abs(side(p)) < EPS; }
    bool onSegment(Point p) { return onLine(p) && dot(this->operator[](0) - p, this->operator[](1) - p) <= EPS; }
    friend istream& operator>>(istream &is, Line &l) { Point p, q; is >> p >> q; l = Line(p, q); return is; }
    friend ostream& operator<<(ostream &os, const Line &l) { return os << '{' << l[0] << ", " << l[1] << '}'; }
};

/* Circle */
struct Circle : Point {
    T r;
    Circle() = default;
    Circle(Point p, T r) : Point(p), r(r) {}
    friend istream& operator>>(istream &is, Circle& c) { Point p; T r; is >> p >> r; c = Circle(p, r); return is; }
    friend ostream& operator<<(ostream &os, const Circle &c) { return os << '(' << c.x << ", " << c.y << ", " << c.r << ')'; }
};

bool is_convex(vector<Point> &ps) {
    bool pos = false, neg = false;
    for (int i = 0, n = ps.size(); i < n; ++i) {
        int o = orient(ps[i], ps[(i + 1) % n], ps[(i + 2) % n]);
        if (o > 0) pos = true;
        if (o < 0) neg = true;
    }
    return !(pos && neg);
}

int main() {
    string s;
    while (getline(cin, s)) {
        s = "," + s;
        stringstream ss(s);
        vector<Point> ps(4);
        for (int i = 0; i < 4; ++i) {
            char c;
            T xx, yy;
            ss >> c >> xx >> c >> yy;
            ps[i] = Point(xx, yy);
        }
        cout << (is_convex(ps) ? "YES" : "NO") << endl;
    }
}
