import Data.List
main = interact $ unlines . map (show' . is_convex . map (read::String->Float) . splitOn ',') . lines
 where show' p = case p of {True -> "NO"; False -> "YES"}

splitOn c xs
 | null xs = []
 | head xs == c = splitOn c (tail xs)
 | otherwise = (takeWhile (/= c)) xs : splitOn c (dropWhile (/= c) xs)

point_in_a_triangle (x1,y1) (x2,y2) (x3,y3) (xp,yp) =
 (compare ((x3-x1)*d12+y1) y3 == compare ((xp-x1)*d12+y1) yp) &&
 (compare ((x1-x2)*d23+y2) y1 == compare ((xp-x2)*d23+y2) yp) &&
 (compare ((x2-x3)*d31+y3) y2 == compare ((xp-x3)*d31+y3) yp)
  where
   d12 = (y2-y1)/(x2-x1)
   d23 = (y3-y2)/(x3-x2)
   d31 = (y1-y3)/(x1-x3)

is_convex [xa,ya,xb,yb,xc,yc,xd,yd] = 
 point_in_a_triangle (xa,ya) (xb,yb) (xc,yc) (xd,yd) ||
 point_in_a_triangle (xb,yb) (xc,yc) (xd,yd) (xa,ya) ||
 point_in_a_triangle (xc,yc) (xd,yd) (xa,ya) (xb,yb) ||
 point_in_a_triangle (xa,yd) (xa,ya) (xb,yb) (xc,yc)