#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toStr(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
const double EPS = 1e-12;
const double PI = acos(-1.0);
const int INF = INT_MAX / 10;
double dot(complex<double> a, complex<double> b) {
  return (a.real() * b.real() + a.imag() * b.imag());
}
double cross(complex<double> a, complex<double> b) {
  return (a.real() * b.imag() - a.imag() * b.imag());
}
int ccw(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  if (cross(b, c) > 0) return +1;
  if (cross(b, c) < 0) return -1;
  if (dot(b, c) < 0) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
namespace std {
bool operator<(const complex<double> &a, const complex<double> &b) {
  return a.real() != b.real() ? a.real() < b.real() : a.imag() < b.imag();
}
}  // namespace std
vector<complex<double> > convex_hull(vector<complex<double> > ps) {
  int n = ps.size(), k = 0;
  sort((ps).begin(), (ps).end());
  vector<complex<double> > ch(2 * n);
  for (int i = 0; i < n; ch[k++] = ps[i++])
    while (k >= 2 && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k;
  for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = ps[i--])
    while (k >= t && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k;
  ch.resize(k - 1);
  return ch;
}
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) {
    complex<double> a(xa, ya), b(xb, yb), c(xc, yc), d(xd, yd);
    vector<complex<double> > points;
    points.push_back(a);
    points.push_back(b);
    points.push_back(c);
    points.push_back(d);
    if (convex_hull(points).size() != 4) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
  return 0;
}
