import Control.Applicative

a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
c = [2]

bel :: Int -> Char
bel n 
  | n `elem` a = 'a'
  | n `elem` b = 'b'
  | n `elem` c = 'c'

answer :: Eq a => a -> a -> String
answer x y
  | x == y = "Yes"
  | otherwise = "No"
  
main = do
  [x, y] <- map (read :: String -> Int) . words <$> getLine
  putStrLn $ answer x y
