#include <iostream>
using namespace std;

class Point {
public:
  double x, y;
  Point(double x = 0, double y = 0):x(x), y(y){}
  Point operator +(Point p) { return Point(x+p.x, y+p.y);}
  Point operator -(Point p) { return Point(x-p.x, y-p.y);}
  Point operator *(double t) { return Point(x*t, y*t);}
};

typedef Point Vector;

double gaiseki(Vector a, Vector b) {
  return a.x*b.y - a.y*b.x;
}

double naiseki(Vector a, Vector b) {
  return a.x*b.x + a.y*b.y;
}

bool isHekomi(Point a, Point b, Point c, Point d) {
  double temp1;
  double temp2;
  int count = 0;
  for(int i = 0; i < 4; i++) {
    switch(i) {
    case 0:
      temp1 = gaiseki(d-a, c-a);
      temp2 = gaiseki(c-a, b-a);
      break;
    case 1:
      temp1 = gaiseki(a-b, d-b);
      temp2 = gaiseki(d-b, c-b);
      break;
    case 2:
      temp1 = gaiseki(b-c, a-c);
      temp2 = gaiseki(a-c, d-c);
      break;
    case 3:
      temp1 = gaiseki(c-d, b-d);
      temp2 = gaiseki(b-d, a-d);
      break;
    }
    if(temp1 >= 0 && temp2 >= 0 || temp1 <= 0 && temp2 <= 0) count++;
  }
  if(count == 4) return false;
  else           return true;
}

int main() {
  Point a, b, c, d;
  while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf", &a.x, &a.y, &b.x, &b.y, &c.x, &c.y, &d.x, &d.y) != EOF) {
    if(!isHekomi(a, b, c, d)) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}