import Control.Applicative
import Data.List (transpose)
type Vector = [Double]

main = do
    set <- getContents
    mapM_ solve (lines set)

solve :: String -> IO ()
solve str = do
    let [xa,ya,xb,yb,xc,yc,xd,yd] = map read.commaSplit $ str
        va = vector (xa,ya)
        vb = vector (xb,yb)
        vc = vector (xc,yc)
        vd = vector (xd,yd)
        vab = add vb (neg va)
        vad = add vd (neg va)
        res = isConvex $ multMV (transVector vab vad) vc
    if res then putStrLn "YES"
           else putStrLn "NO"

commaSplit :: String -> [String]
commaSplit [] = []
commaSplit str = h : commaSplit rest
    where (h,r) = break (== ',') str
          rest  = if null r then []
                            else tail r

vector :: (Double, Double) -> Vector
vector (x1,y1) = [x1,y1]

add :: Vector -> Vector -> Vector
add = zipWith (+)

neg :: Vector -> Vector
neg = map negate

dot :: Vector -> Vector -> Double
dot a b = sum$zipWith (*) a b

multMV :: [Vector] -> Vector -> Vector
multMV m v = map (\x -> dot v x) $ transpose m

inverse :: [Vector] -> [Vector]
inverse [[a,c],[b,d]] = map (map (/(a*d - b*c))) [[d, negate c], [negate b, a]]

transVector :: Vector -> Vector -> [Vector]
transVector v1 v2 = inverse [v1,v2]

isConvex :: Vector -> Bool
isConvex [a,b]
  | a <= 0 || b <= 0 = False
  | a + b <= 1       = False
  | otherwise        = True