import Control.Applicative
import Data.List.Split

data YesNo = YES | NO deriving(Show)
type Coord = (Double, Double)

reshape :: [Double] -> [Coord]
reshape [] = []
reshape [_] = []
reshape (x:y:xs) = (x, y) : reshape xs

normalForm :: [Coord] -> [Coord]
normalForm xs =
  let minY = minimum (map snd xs)
      mins = filter (\c -> snd c == minY) xs
      st   = head mins
  in
      st : (tail (dropWhile (/= st) xs) ++ takeWhile (/= st) xs)

delta :: Coord -> Coord -> Coord -> Double
delta x y z =
  ((fst y - fst x) * (snd z - snd x) - (fst z - fst x) * (snd y - snd x)) / 2

solver' :: [Double] -> YesNo
solver' xs =
  let (p1:p2:p3:p4:_) = normalForm $ reshape xs
  in
      if delta p1 p2 p3 * delta p2 p3 p4 * delta p3 p4 p1 > 0
        then YES
        else NO

main :: IO()
main = do
  line <- getLine
  let xs = map (read :: String -> Double) $ splitOn "," line
  print $ solver' xs