open Batteries
open Printf
let () =
  let x,y = Scanf.scanf "%d %d " (fun a b -> a,b) in

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

  Printf.printf "%s\n" @@
  if List.mem x a && List.mem y a || List.mem x b && List.mem y b || List.mem x c && List.mem y c then
    "Yes" else "No"
