import Data.List.Split
import Control.Applicative

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)
        && ((snd p2 > snd p1) || (snd p2 >= snd p3))
        && ((snd p3 > snd p2) || (snd p3 >= snd p4))
        && ((snd p4 > snd p3) || (snd p4 >= snd p1))
        then YES
        else NO

solver :: [[Double]] -> [YesNo]
solver = map solver'

main :: IO()
main = do
  contents <- lines <$> getContents
  let xs = map (map (read :: String -> Double) . splitOn ",") contents
  mapM_ print $ solver xs