solve :: Int -> Int -> Bool
solve m n
    | m == 1 = False
    | n <= 3 = even m
    | even n = True
    | otherwise = mod m 4 /= 1


main :: IO ()
main = do
    [n, m] <- fmap read . words <$> getLine :: IO [Int]
    putStrLn $ if solve n m then "YES" else "NO"
