import Data.List.Split

data Vec2 = Vec2 Double Double deriving Eq

(/--) :: Vec2 -> Vec2 -> Vec2
(/--) (Vec2 a1 a2) (Vec2 b1 b2) = (Vec2 (a1 - b1) (a2 - b2))

-- Cross Product
(/**) :: Vec2 -> Vec2 -> Double
(/**) (Vec2 a1 a2) (Vec2 b1 b2) = a1 * b2 - a2 * b1

isConvex :: [Double] -> String
isConvex [xa, ya, xb, yb, xc, yc, xd, yd]
    | (all (> 0) cps) || all (< 0) cps = "YES"
    | otherwise                        = "NO"
    where
        vab = (Vec2 xb yb) /-- (Vec2 xa ya)
        vbc = (Vec2 xc yc) /-- (Vec2 xb yb)
        vcd = (Vec2 xd yd) /-- (Vec2 xc yc)
        vda = (Vec2 xa ya) /-- (Vec2 xd yd)
        cps = [vab /** vbc, vbc /** vcd, vcd /** vda, vda /** vab]

main :: IO ()
main = interact $ unlines . map isConvex . map (map read) . map (splitOn ",") . lines