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

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;
typedef pair<double, double> pdd;

int main()
{
    double xa, ya, xb, yb, xc, yc, xd, yd;
    char c;
    while (cin >> xa >> c >> ya >> c >> xb >> c >> yb >> c >> xc >> c >> yc >> c >> xd >> c >> yd)
    {
        deque<pdd> q;
        q.push_back(pdd(xa, ya));
        q.push_back(pdd(xb, yb));
        q.push_back(pdd(xc, yc));
        q.push_back(pdd(xd, yd));

        bool flag = 0;

        rep(i, 4)
        {
            vector<pdd> v(3);

            rep(k, 3)
            {
                v[k].first = q[3].first - q[k].first;
                v[k].second = q[3].second - q[k].second;
            }

            auto v_pro = [](pdd p, pdd q) {
                return p.first * q.second - p.second * q.first;
            };

            if ((v_pro(v[0], v[1]) > 0 && v_pro(v[1], v[2]) > 0 && v_pro(v[2], v[0]) > 0) || (v_pro(v[0], v[1]) < 0 && v_pro(v[1], v[2]) < 0 && v_pro(v[2], v[0]) < 0))
                flag = 1;

            q.push_back(q.front());
            q.pop_front();
        }

        if (flag == 1)
            OP("NO");
        else
            OP("YES");
    }

    return 0;
}
