var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=(input.trim()).split("\n");
Arr.forEach(function(v){
var arr=v.split(",").map(Number);
var x="NO";
if(arr[3]-arr[1]!=0 && arr[3+4]-arr[1+4]!=0){
var ab=(arr[2]-arr[0])/(arr[3]-arr[1]);
var cd=(arr[2+4]-arr[0+4])/(arr[3+4]-arr[1+4]);
if(ab==cd)x="YES";
}
if(arr[3]-arr[1]==0 && arr[3+4]-arr[1+4]==0)x="YES";
console.log(x);
});