output_description: If x and y belong to the same group, print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      x y
attempt: #!/usr/bin/env python3
  from collections import defaultdict
  from collections import deque
  from heapq import heappush, heappop
  import sys
  import math
  import bisect
  import random
  import itertools
  
  sys.setrecursionlimit(10**5)
  stdin = sys.stdin
  bisect_left = bisect.bisect_left
  bisect_right = bisect.bisect_right
  
  
  def LI():
      return list(map(int, stdin.readline().split()))
  
  
  def LF():
      return list(map(float, stdin.readline().split()))
  
  
  def LI_():
      return list(map(lambda x: int(x) - 1, stdin.readline().split()))
  
  
  def II():
      return int(stdin.readline())
  
  
  def IF():
      return float(stdin.readline())
  
  
  def LS():
      return list(map(list, stdin.readline().split()))
  
  
  def S():
      return list(stdin.readline().rstrip())
  
  
  def IR(n):
      return [II() for _ in range(n)]
  
  
  def LIR(n):
      return [LI() for _ in range(n)]
  
  
  def FR(n):
      return [IF() for _ in range(n)]
  
  
  def LFR(n):
      return [LI() for _ in range(n)]
  
  
  def LIR_(n):
      return [LI_() for _ in range(n)]
  
  
  def SR(n):
      return [S() for _ in range(n)]
  
  
  def LSR(n):
      return [LS() for _ in range(n)]
  
  
  mod = 1000000007
  inf = float("INF")
  
  
  # A
  def A():
      x, y = LI()
      a = [1, 3, 5, 7, 8, 10, 12]
      b = [4, 6, 9, 11]
      c = [2]
      if x in a and y in a:
          print("Yes")
          return
      if x in b and y in b:
          print("Yes")
          return
      if x in c and y in c:
          print("Yes")
          return
      print("No")
      return
  
  
  # B
  def B():
      return
  
  
  # C
  def C():
      return
  
  
  # D
  def D():
      return
  
  
  # E
  def E():
      return
  
  
  # F
  def F():
      return
  
  
  # G
  def G():
      return
  
  
  # H
  def H():
      return
  
  
  # Solve
  if __name__ == "__main__":
      A()
  
problem_description: Statement
  
  Based on some criterion, Snuke divided the integers from 1 through 12 into
  three groups as shown in the figure below. Given two integers x and y (1 ≤ x <
  y ≤ 12), determine whether they belong to the same group.
  
  ![b4ab979900ed647703389d4349eb84ee.png](https://atcoder.jp/img/arc074/b4ab979900ed647703389d4349eb84ee.png)
samples: [{"input": "1 3", "output": "Yes\n    \n\n* * *"}, {"input": "2 4", "output": "No"}]