import Control.Monad
import Control.Applicative
import Data.Functor
import Data.List
import Data.List.Split
import Data.Char
import Data.Ratio
import Data.Ord
import Data.Array.IO

readInt = read :: String -> Int
getInt = readLn :: IO Int
getInts = map readInt . words <$> getLine
sjoin :: (Show a) => [a] -> String
sjoin = unwords . map show
cond :: a -> a -> Bool -> a
cond t f c = if c then t else f
-- end of templete

line x1 y1 x2 y2 x y = (y2 - y1) * x - (x2 - x1) * y - x1 * y2 + x2 * y1

convex [xa,ya,xb,yb,xc,yc,xd,yd] = l1 xb yb * l1 xd yd < 0 && l2 xa ya * l2 xc yc < 0
  where
    l1 = line xa ya xc yc
    l2 = line xb yb xd yd

main = do
    ls <- map (map read . wordsBy (==',')) . lines <$> getContents :: IO [[Double]]
    forM_ ls $ \line -> do
    putStrLn $ cond "YES" "NO" $ convex line
        