#include <bits/stdc++.h>
using namespace std;
template <class T, class S>
inline bool minup(T& m, S x) {
  return m > (T)x ? (m = (T)x, true) : false;
}
template <class T, class S>
inline bool maxup(T& m, S x) {
  return m < (T)x ? (m = (T)x, true) : false;
}
const int INF = 1000000000;
const long long int MOD = 1000000007LL;
const double EPS = 1E-12;
struct Point : public complex<double> {
 public:
  Point() {
    this->real(0);
    this->imag(0);
  }
  Point(const double& x, const double& y) {
    this->real(x);
    this->imag(y);
  }
  Point(const complex<double> w) {
    this->real(w.real());
    this->imag(w.imag());
  }
  inline double dot(Point p) { return (conj(*this) * p).real(); }
  inline double det(Point p) { return (conj(*this) * p).imag(); }
};
namespace std {
bool operator<(const Point& a, const Point& b) {
  return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
}  // namespace std
int ccw(Point a, Point b, Point c) {
  b -= a;
  c -= a;
  if (b.det(c) > 0.0) return 1;
  if (b.det(c) < 0.0) return -1;
  if (b.dot(c) < 0.0) return 2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
bool isConvex(const vector<Point>& P) {
  for (int i = 0; i < P.size(); ++i)
    if (ccw(P[(i + P.size() - 1) % P.size()], P[(i) % P.size()],
            P[(i + 1) % P.size()]) > 0)
      return false;
  return true;
}
vector<Point> AndrewMonotoneChain(vector<Point> ps) {
  int n = ps.size(), k = 0;
  sort(ps.begin(), ps.end());
  vector<Point> 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;
}
template <typename T>
ostream& operator<<(ostream& r, const vector<T> t) {
  for (__typeof((t).begin()) v = (t).begin(); v != (t).end(); v++)
    r << *v << (v + 1 == t.end() ? "" : " ");
  return r;
}
template <typename T>
ostream& operator<<(ostream& r, const pair<vector<T>, int> p) {
  int n = p.second;
  minup(n, p.first.size());
  for (int(i) = 0; (i) < (n - 1); (i)++) r << p.first[i] << ' ';
  r << p.first[n - 1];
  return r;
}
template <typename T>
ostream& operator<<(ostream& r, const pair<T*, int> p) {
  int n = p.second - 1;
  for (int(i) = 0; (i) < (n); (i)++) r << p.first[i] << ' ';
  return r << p.first[n];
}
template <typename T, size_t S>
ostream& operator<<(ostream& r, const T (&a)[S]) {
  for (int(i) = 0; (i) < (S - 1); (i)++) r << a[i] << ' ';
  return r << a[S - 1];
}
double x, y;
bool ok = true;
int main() {
  while (~scanf("%lf,%lf", &x, &y)) {
    vector<Point> P;
    P.push_back(Point(x, y));
    for (int(i) = 0; (i) < (3); (i)++) {
      scanf(",%lf,%lf", &x, &y);
      P.push_back(Point(x, y));
    }
    puts(AndrewMonotoneChain(P) == P ? "YES" : "NO");
  }
  return 0;
}
