let () = Scanf.scanf "%d %d\n" 
	(fun x y -> let l = [4;6;9;11] in
    Printf.printf "%s\n"
    (if List.mem x l && List.mem y l || x = 2 && y = 2 || x <> 2 && y <> 2 && not (List.mem x l || List.mem y l) 
    then "Yes" else "No"))