<?php

while (TRUE) {
    $a = fscanf(STDIN, '%f,%f,%f,%f,%f,%f,%f,%f');
    if (feof(STDIN)) {
        break;
    }
    echo deg($a[0], $a[1], $a[2], $a[3], $a[4], $a[5]) &&
         deg($a[2], $a[3], $a[4], $a[5], $a[6], $a[7]) &&
         deg($a[4], $a[5], $a[6], $a[7], $a[0], $a[1]) &&
         deg($a[6], $a[7], $a[0], $a[1], $a[2], $a[3]) ?
         'YES' : 'NO';
    echo PHP_EOL;
}

function deg($x1, $y1, $x2, $y2, $x3, $y3) {
    $d12 = d($x1, $y1, $x2, $y2);
    $d23 = d($x1, $y1, $x2, $y2);
    $d31 = d($x3, $y3, $x1, $y1);
    return $d12 * $d12 + $d23 * $d23 <= $d31 * $d31;
}

function d($x1, $y1, $x2, $y2) {
    return ($x1 - $x2) * ($x1 - $x2) + ($y1 - $y2) * ($y1 - $y2);
}