#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void priv(vector<T> a) {
  for (int i = 0; i < a.size(); i++) {
    cout << a[i];
    if (i == a.size() - 1)
      cout << endl;
    else
      cout << " ";
  }
}
int gcd(int a, int b) {
  int c = max(a, b);
  int d = min(a, b);
  return c == 0 || d == 0 ? c : gcd(c % d, d);
}
int lcm(int a, int b) { return a == 0 || b == 0 ? 0 : a * b / gcd(a, b); }
double det(double x1, double y1, double x2, double y2, double x3, double y3) {
  double a = x2 - x1;
  double b = y2 - y1;
  double c = x3 - x1;
  double d = y3 - y1;
  return a * d - b * c;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  double x1, y1, x2, y2, x3, y3, x4, y4;
  while (~scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2, &x3, &y3,
                &x4, &y4)) {
    double a1 = det(x1, y1, x2, y2, x3, y3);
    double a2 = det(x1, y1, x2, y2, x4, y4);
    double a3 = det(x2, y2, x4, y4, x1, y1);
    double a4 = det(x2, y2, x4, y4, x3, y3);
    printf("%s\n", (a1 * a2 > 0 && a3 * a4 > 0) ? "NO" : "YES");
  }
  return 0;
}
