import Control.Applicative

xor True b = not b
xor False b = b

main :: IO()
main = do
  [s,e,n,w] <- (\x -> map (flip elem x) "SENW") <$> getLine
  putStrLn $ if (s `xor` n) || (e `xor` w) then "NO" else "YES"
