main = getLine >>= putStrLn . solve . (read :: String -> Int) solve :: Int -> String solve n = if n `mod` 6 == 0 then "Yes" else "No"