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.

-----Constraints-----
 - x and y are integers.
 - 1 ≤ x < y ≤ 12

-----Input-----
Input is given from Standard Input in the following format:
x y

-----Output-----
If x and y belong to the same group, print Yes; otherwise, print No.

-----Sample Input-----
1 3

-----Sample Output-----
Yes

[{"code": "n1 = [1, 3, 5, 7, 8, 10, 12]\nn2 = [4, 6, 9, 11]\n\na, b = list(map(int, input().split()))\nprint((\"Yes\" if a in n1 and b in n1 or a in n2 and b in n2 else \"No\"))\n", "passed": true, "time": 0.15, "memory": 14144.0, "status": "done"}, {"code": "lst1 = [4,6,9,11]\nlst2 = [2]\nlst3 = [1,3,5,7,8,10,12]\nx,y = map(int,input().split())\nif x in lst1 and y in lst1:\n    print('Yes')\nelif x in lst2 and y in lst2:\n    print('Yes')\nelif x in lst3 and y in lst3:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.22, "memory": 14212.0, "status": "done"}, {"code": "x,y=map(int,input().split())\nA=[2]\nB=[4,6,9,11]\nC=[1,3,5,7,8,10,12]\nif x in B and y in B:\n  print(\"Yes\")\nelif x in C and y in C:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "a,b,c=[1,3,5,7,8,10,12],[4,6,9,11],[2]\nprint('YNeos'[len(set([0 if i in a else [1,2][i in b] for i in list(map(int,input().split()))]))!=1::2])", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "X,Y=map(int,input().split())\nA=1,3,5,7,8,10,12\nB=4,6,9,11\nC=2\nans=\"No\"\nif X in A and Y in A:\n    ans=\"Yes\"\nelif X in B and Y in B:\n    ans=\"Yes\"\nelif X==Y==2:\n    ans=\"Yes\"\nprint(ans)", "passed": true, "time": 0.23, "memory": 14120.0, "status": "done"}, {"code": "x,y=map(int,input().split())\ngrp1=[1,3,5,7,8,10,12]\ngrp2=[4,6,9,11]\n\nif x in grp1 and y in grp1: print(\"Yes\")\nelif x in grp2 and y in grp2: print(\"Yes\")\nelse: print(\"No\")", "passed": true, "time": 0.23, "memory": 14124.0, "status": "done"}, {"code": "a = map(int, input().split())\ninput_list = list(a)\n\ngroup_a = [1, 3, 5, 7, 8, 10, 12]\ngroup_b = [4, 6, 9, 11]\ngroup_c = [2]\nlist_of_list = [group_a, group_b, group_c]\n\ncount_match = 0\n\nfor list_i in list_of_list:\n    if input_list[0] in list_i and input_list[1] in list_i:\n        count_match += 1\n        break\n\nif count_match == 1:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.22, "memory": 14216.0, "status": "done"}, {"code": "data_1 =[1,3,5,7,8,10,12]\ndata_2 =[4,6,9,11]\nx,y = map(int,input().split())\nif x in data_1 and y in data_1:\n    print('Yes')\nelif x in data_2 and y in data_2:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.22, "memory": 14084.0, "status": "done"}, {"code": "#!/usr/bin/env python3\nx, y = list(map(int, input().split()))\n\na = [1, 3, 5, 7, 8, 10, 12]\nb = [4, 6, 9, 11]\nc = [2]\n\nif x in a and y in a:\n    print('Yes')\nelif x in b and y in b:\n    print('Yes')\nelif x in c and y in c:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.23, "memory": 14308.0, "status": "done"}, {"code": "a,b = map(int,input().split())\n\nx = [1,3,5,7,8,10,12]\ny = [4,6,9,11]\n\nif a in x and b in x or a in y and b in y:\n  print('Yes')\n  \nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "x,y=map(int,input().split())\ns1 = [1,3,5,7,8,10,12]\ns2 = [4,6,9,11]\ns3 = [2]\nif x in s1 and y in s1:\n    print('Yes')\nelif x in s2 and y in s2:\n    print('Yes')\nelif x in s3 and y in s3:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.16, "memory": 14244.0, "status": "done"}, {"code": "x,y = map(int, input().split())\na = [1,3,5,7,8,10,12]\nb = [4,6,9,11]\nc = [2]\nif (x in a and y in a) or (x in b and y in b) or (x in c and y in c):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.23, "memory": 14168.0, "status": "done"}, {"code": "x, y = map(int, input().split())\n\nA = [1, 3, 5, 7, 8, 10, 12]\nB = [4, 6, 9, 11]\nC = [2, ]\n\nif x in A and y in A:\n    print('Yes')\nelif x in B and y in B:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.23, "memory": 14108.0, "status": "done"}, {"code": "x,y=map(int,input().split())\n\nn=[0,1,3,1,2,1,2,1,1,2,1,2,1]\n\nif n[x]==n[y]:\n    ans=\"Yes\"\nelse:\n    ans=\"No\"\n            \nprint(ans)", "passed": true, "time": 0.22, "memory": 14112.0, "status": "done"}, {"code": "A=[1,3,5,7,8,10,12]\nB=[4,6,9,11]\nC=[2]\nx,y = map(int,input().split())\nif x in A and y in A:\n    print('Yes')  \nelif x in B and y in B:\n    print('Yes')\nelse:\n    print('No') ", "passed": true, "time": 0.14, "memory": 14320.0, "status": "done"}, {"code": "x, y = map(int,input().split())\nS1 = [1, 3, 5, 7, 8, 10, 12]\nS2 = [4, 6, 9, 11]\nans = False\nfor i in range(len(S1)):\n  for j in range(len(S1)):\n    if S1[i] == x and S1[j] == y:\n      ans = True\nfor i in range(len(S2)):\n  for j in range(len(S2)):\n    if S2[i] == x and S2[j] == y:\n      ans = True\nif ans:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14352.0, "status": "done"}, {"code": "c = [['1', '3', '5', '7', '8', '10', '12'], ['4', '6', '9', '11'], ['2']]\n\na, b = input().split(' ')\n\nif a in c[0] and b in c[0]:\n  print(\"Yes\")\nelif a in c[1] and b in c[1]:\n  print(\"Yes\")\nelif a in c[2] and b in c[2]:\n  print(\"Yes\")\nelse:\n  print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14196.0, "status": "done"}, {"code": "x, y = map(int, input().split())\ngroup1 = [1, 3, 5, 7, 8, 10, 12]\ngroup2 = [4, 6, 9, 11]\n\nflag = False\nif x in group1 and y in group1:\n    flag = True\nelif x in group2 and y in group2:\n    flag = True\n    \nif flag:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.15, "memory": 14112.0, "status": "done"}, {"code": "x, y = list(map(int, input().split()))\na = [1, 3, 5, 7, 8, 10, 12]\nb = [4, 6, 9, 11]\nc = [2]\n\nif x in a and x not in b and x not in c and y in a and y not in b and y not in c:\n  print('Yes')\nelif x not in a and x in b and x not in c and y not in a and y in b and y not in c :\n  print('Yes')\nelse:\n  print('No')\n", "passed": true, "time": 0.14, "memory": 14284.0, "status": "done"}, {"code": "x,y = map(int,input().split())\ngr_a = [1,3,5,7,8,10,12]\ngr_b = [4,6,9,11]\ngr_c = [2]\n\nif x in gr_a and y in gr_a:\n  print(\"Yes\")\nelif x in gr_b and y in gr_b:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.15, "memory": 14056.0, "status": "done"}, {"code": "g1 = [4, 6, 9, 11]\ng2 = [2]\n\nx, y = list(map(int, input().split()))\ngx = 1 if x in g1 else 2 if x in g2 else 0\ngy = 1 if y in g1 else 2 if y in g2 else 0\nprint((\"Yes\" if gx == gy else \"No\"))\n", "passed": true, "time": 0.14, "memory": 14128.0, "status": "done"}, {"code": "a = map(int, input().split())\ninput_set = set(a)\n\ngroup_a = {1, 3, 5, 7, 8, 10, 12}\ngroup_b = {4, 6, 9, 11}\ngroup_c = {2}\n\nlist_of_list = [group_a, group_b, group_c]\n\ncount_match = 0\n\nfor set_i in list_of_list:\n    if set_i.issuperset(input_set):\n        count_match += 1\n        print('Yes')\n        break\n\nif not count_match >= 1:\n    print('No')", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "a=[1,3,5,7,8,10,12]\nb=[4,6,9,11]\nc=list(map(int,input().split(\" \")))\nprint(\"Yes\") if (c[0] in a and c[1] in a) or (c[0] in b and c[1] in b) else print(\"No\")", "passed": true, "time": 0.18, "memory": 14264.0, "status": "done"}, {"code": "x, y = list(map(int,input().split()))\n\na= [1,3,5,7,8,10,12]\nb= [4,6,9,11]\nc= [2]\n\nif (x in a and y in a) or (x in b and y in b) or (x in c and y in c):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "x,y=map(int,input().split())\na=[1,3,5,7,8,10,12]\nb=[4,6,9,11]\nc=[2]\n\nif (x in a and y in a) or (x in b and y in b) or (x in c and y in c):\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.16, "memory": 14168.0, "status": "done"}, {"code": "l = ((1,3,5,7,8,10,12),(4,6,9,11),(0,2))\nx,y = map(int, input().split())\np = 0\nfor i in l:\n\tif x in i and y in i:\n\t\tp = 1\n\t\tbreak\nans = 'Yes' if p == 1 else 'No'\nprint(ans)", "passed": true, "time": 0.14, "memory": 14108.0, "status": "done"}, {"code": "group1 = [1, 3, 5, 7, 8, 10, 12]\ngroup2 = [4, 6, 9, 11]\n\nx, y = map(int, input().split())\n\nif (x in group1 and y in group1) or (x in group2 and y in group2) or (x == y == 2):\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "print('YNeos'[len(set([0 if i==2 else [1,2][i in [4,6,9,11]] for i in [*map(int,input().split())]]))!=1::2])", "passed": true, "time": 0.14, "memory": 14072.0, "status": "done"}, {"code": "G1 = [1,3,5,7,8,10,12]\nG2 = [4,6,9,11]\nx,y = map(int, input().split())\n\nif x in G1 and y in G1:\n  print('Yes')\nelif x in G2 and y in G2:\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "x,y=map(int,input().split())\na=[1,3,5,7,8,10,12]\nb=[4,6,9,11]\nif x in a and y in a :\n  print(\"Yes\")\nelif x in b and y in b :\n  print(\"Yes\")\nelse :\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "x,y=list(map(int,input().split()))\nfor l in [[1,3,5,7,8,10,12],[4,6,9,11],[2]]:\n    if x in l and y in l:\n        print('Yes')\n        return\nprint('No')\n", "passed": true, "time": 0.14, "memory": 14312.0, "status": "done"}, {"code": "x, y = map(int, input().split())\n\ng1 = [1, 3, 5, 7, 8, 10, 12]\ng2 = [4, 6, 9, 11]\ng3 = [2]\n\nif (x in g1 and y in g1) or (x in g2 and y in g2) or (x in g3 and y in g3):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "a, b = list(map(int, input().split()))\n\nlis = [4, 6, 9, 11]\nlis2 = [1, 3, 5, 7, 8, 10, 12]\n\nif a == b == 2:\n    print('Yes')\nelif a in lis and b in lis:\n    print('Yes')\nelif a in lis2 and b in lis2:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.15, "memory": 14356.0, "status": "done"}, {"code": "def solve():\n    x, y = list(map(int, input().split()))\n    a = [1, 3, 5, 7, 8, 10, 12]\n    b = [4, 6, 9, 11]\n    c = [2]\n\n    if (x in a and y in a) or (x in b and y in b) or (x in c and y in c):\n        print(\"Yes\")\n    else:\n        print(\"No\")\n\n\ndef __starting_point():\n    solve()\n\n__starting_point()", "passed": true, "time": 0.15, "memory": 14320.0, "status": "done"}, {"code": "array1 = [1,3,5,7,8,10,12]\narray2 = [4,6,9,11]\narray3 = [2]\nx,y = map(int,input().split())\nif (x in array1 and y in array1) or (x in array2 and y in array2) or (x in array3 and y in array3):\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.15, "memory": 14356.0, "status": "done"}, {"code": "x,y=map(int,input().split())\na=[1,3,5,7,8,10,12]\nb=[4,6,9,11]\nif x in a and y in a:\n    print(\"Yes\")\nelif x in b and y in b:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.16, "memory": 14256.0, "status": "done"}, {"code": "s1 =set([1,3,5,7,8,10,12])\ns2 =set([4,6,9,11])\ns3 =set([2])\na,b =map(int,input().split())\nfor i in [s1,s2,s3]:\n  if a in i and b in i:\n    print(\"Yes\")\n    break\nelse:\n  print(\"No\")", "passed": true, "time": 0.15, "memory": 14080.0, "status": "done"}, {"code": "a = [1, 3, 5, 7, 8, 10, 12]\nb = [4, 6, 9, 11]\nc = [2]\nx, y = map(int, input().split())\nif a.count(x) * a.count(y) > 0 or b.count(x) * b.count(y) > 0 or c.count(x) * c.count(y) > 0:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14168.0, "status": "done"}, {"code": "a,b = [int(x) for x in input().split()]\ng = [[] for x in range(3)]\ng[0] = [1,3,5,7,8,10,12]\ng[1] = [4,6,9,11]\ng[2] = [2]\nres = \"No\"\nfor i in range(3):\n  if a in g[i] and b in g[i]:\n    res = \"Yes\"\n    \nprint(res)", "passed": true, "time": 0.14, "memory": 14308.0, "status": "done"}, {"code": "a, b = map(int, input().split())\n\nif a == 4 or a == 6 or a == 9 or a == 11:\n  if b == 1 or b == 2 or b == 3 or b == 5 or b == 7 or b == 8 or b == 10 or b == 12:\n    print(\"No\")\n  else:\n    print(\"Yes\")\n    \nelif a == 2:\n  print(\"No\")\n  \nelse:\n  if b == 2 or b == 4 or b == 6 or b == 9 or b == 11:\n    print(\"No\")\n  else:\n    print(\"Yes\")", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "a=[1,3,5,7,8,10,12]\nb=[4,6,9,11]\nc=[2]\np=0\nq=0\n\ns=list(map(int,input().split()))\n\nfor i in a:\n  if s[0]==i:\n    p=0\n  elif s[0]==2:\n    p=2\n  else:\n    p=1\n\nfor i in a:\n  if s[1]==i:\n    q=0\n  elif s[1]==2:\n    q=2\n  else:\n    q=1\n\nif p==q:\n  print('Yes')\nelse:\n  print('No')\n", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "a,b=map(int,input().split())\nl1=[1,3,5,7,8,10,12]\nl2=[4,6,9,11] \nif a==2 or b==2:\n  print(\"No\")\nelif a in l1 and b in l1:\n  print(\"Yes\")\nelif a in l2 and b in l2:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "a, b = map(int, input().split())\ns = {1, 3, 5, 8, 7, 10, 12}\nt = {4, 6, 9, 11}\nu = {2}\nif a in s and b in s:\n    print(\"Yes\")\nelif a in t and b in t:\n    print(\"Yes\")\nelif a in u and b in u:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "x, y = list(map(int, input().split()))\na = [1, 3, 5, 7, 8, 10, 12]\nb = [4, 6, 9, 11]\nc = [2]\n\nif (x in a and y in a) or (x in b and y in b) or (x in c and y in c):\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14168.0, "status": "done"}, {"code": "x, y=map(int, input().split())\nA=set([1, 3, 5, 7, 8, 10, 12])\nB=set([4, 6, 9, 11])\nif x in A and y in A:\n  print('Yes')\nelif x in B and y in B:\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "x,y=map(int,input().split())\n \nA=[1,3,5,7,8,10,12]\nB=[4,6,9,11]\n \nif x==2 or y==2:\n  print('No')\nelif (x in A and y in A) or (x in B and y in B):\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "x,y=map(int, input().split())  \ng=[[1,3,5,7,8,10,12],[4,6,9,11]]\nprint(\"Yes\" if any(x in g[i] and y in g[i] for i in range(2)) else \"No\")", "passed": true, "time": 0.23, "memory": 14132.0, "status": "done"}, {"code": "gr = [0,1,3,1,2,1,2,1,1,2,1,2,1]\nx, y = map(int, input().split())\nans = 'Yes' if gr[x] == gr[y] else 'No'\nprint(ans)", "passed": true, "time": 0.23, "memory": 14296.0, "status": "done"}, {"code": "x,y = map(int,input().split())\n\ngrp1=[1,3,5,7,8,10,12]\ngrp2=[4,6,9,11]\n\nif x in grp1 and y in grp1: print('Yes')\nelif x in grp2 and y in grp2: print('Yes')\nelse: print('No')", "passed": true, "time": 0.14, "memory": 14332.0, "status": "done"}, {"code": "a=[1,3,5,7,8,10,12]\nb=[4,6,9,11]\nx,y=map(int,input().split())\nif (x in a and y in a) or (x in b and y in b):print('Yes')\nelse:print('No')", "passed": true, "time": 0.14, "memory": 14196.0, "status": "done"}, {"code": "x,y=map(int,input().split())\ngroup_A=[1,3,5,7,8,10,12]\ngroup_B=[4,6,9,11]\nif x in group_A and y in group_A :\n  print(\"Yes\")\nelif x in group_B and y in group_B :\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.15, "memory": 14276.0, "status": "done"}, {"code": "L=[1,0,1,2,1,2,1,1,2,1,2,1]\na,b=map(int,input().split())\nif L[a-1]==L[b-1]:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "a = [1, 3, 5, 7, 8, 10, 12]\nb = [4, 6, 9, 11]\nc = [2]\nx, y = map(int, input().split())\nif (x in a and y in a) or (x in b and y in b) or (x in c and y in c):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "x,y=list(map(int,input().split()))\nA={1,3,5,7,8,10,13}\nB={4,6,9,11}\nC={2}\n\nif (x in A and y in A) or (x in B and y in B) or (x in C and y in C):\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14308.0, "status": "done"}, {"code": "g = [-1, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0]\nx, y = map(int, input().split())\nif g[x] == g[y]: print('Yes')\nelse: print('No')", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "x, y = list(map(int, input().split()))\n\nga = [4,6,9,11]\ngb = [1,3,5,7,8,10,12]\ngc = [2]\n\nxg = yg = \"\"\ndef group(x):\n  if x in ga:\n    return \"ga\"\n  if x in gb:\n    return \"gb\"\n  if x in gc:\n    return \"gc\"\nxg = group(x)\nyg = group(y)\nif xg == yg:\n  print(\"Yes\")\nelse:\n  print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "x, y = map(int, input().split())\n\ng1 = [1, 3, 5, 7, 8, 10, 12]\ng2 = [4, 6, 9, 11]\n\n\nif x == 2 and y == 2:\n    print(\"Yes\")\nelif x in g1 and y in g1:\n    print(\"Yes\")\nelif x in g2 and y in g2:\n    print(\"Yes\")\nelse:\n print(\"No\")", "passed": true, "time": 0.14, "memory": 14136.0, "status": "done"}, {"code": "a,b=map(int,input().split())\ns=[1,3,5,7,8,10,12]\nt=[4,6,9,11]\nif a in s:\n    a = 0\nelif a in t:\n    a = 1\nelse:\n    a = 2\nif b in s:\n    b = 0\nelif b in t:\n    b = 1\nelse:\n    b = 2\nprint(\"Yes\" if a==b else \"No\")", "passed": true, "time": 0.14, "memory": 14320.0, "status": "done"}, {"code": "N = 12\nParent = [I for I in range(N+1)]\nRank = [0]*(N+1)\ndef FindParent(X):\n    if Parent[X]==X:\n        return X\n    else:\n        Parent[X] = FindParent(Parent[X])\n        return Parent[X]\n\ndef CheckParent(X,Y):\n    return FindParent(X)==FindParent(Y)\n\ndef UniteParent(X,Y):\n    X = FindParent(X)\n    Y = FindParent(Y)\n    if X==Y:\n        return 0\n    if Rank[X]<Rank[Y]:\n        Parent[X] = Y\n    else:\n        Parent[Y] = X\n        if Rank[X]==Rank[Y]:\n            Rank[X] += 1\n            \nfor GA in [3,5,7,8,10,12]:\n    UniteParent(1,GA)\nfor GB in [6,9,11]:\n    UniteParent(4,GB)\nX,Y = (int(T) for T in input().split())\nprint(['No','Yes'][CheckParent(X,Y)])", "passed": true, "time": 0.22, "memory": 14356.0, "status": "done"}, {"code": "import bisect, collections, copy, heapq, itertools, math, string, sys\ninput = lambda: sys.stdin.readline().rstrip() \nsys.setrecursionlimit(10**7)\nINF = float('inf')\ndef I(): return int(input())\ndef F(): return float(input())\ndef SS(): return input()\ndef LI(): return [int(x) for x in input().split()]\ndef LI_(): return [int(x)-1 for x in input().split()]\ndef LF(): return [float(x) for x in input().split()]\ndef LSS(): return input().split()\n\ndef resolve():\n    x, y = LI()\n    d = {1: 0, 2: 2, 3: 0, 4: 1, 5: 0, 6: 1, 7: 0, 8: 0, 9: 1, 10: 0, 11: 1, 12: 0}\n\n    if d[x] == d[y]:\n        print('Yes')\n    else:\n        print('No')\n\ndef __starting_point():\n    resolve()\n\n__starting_point()", "passed": true, "time": 0.24, "memory": 14384.0, "status": "done"}, {"code": "a = [1,3,5,7,8,10,12]\nb = [4,6,9,11]\nc = [2]\nx,y=map(int,input().split())\nif x in a and y in a:\n  print(\"Yes\")\nelif x in b and y in b:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "x,y=map(int,input().split())\ns1={1,3,5,7,8,10,12}\ns2={4,6,9,11}\nprint([\"No\",\"Yes\"][(x in s1 and y in s1) or (x in s2 and y in s2)]) ", "passed": true, "time": 0.15, "memory": 14124.0, "status": "done"}, {"code": "x, y = map(int, input().split())\na = [1, 3, 5, 7, 8, 10, 12]\nb = [4, 6, 9, 11]\nc = [2]\n\nif (x in a and y in a) or (x in b and y in b) or (x in c and y in c):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14136.0, "status": "done"}, {"code": "g = [0,1,3,1,2,1,2,1,1,2,1,2,1]\nx, y = map(int,input().split())\n\nprint('Yes') if g[x] == g[y] else print('No')", "passed": true, "time": 0.14, "memory": 14312.0, "status": "done"}, {"code": "x,y=map(int,input().split())\ndata=[1,3,1,2,1,2,1,1,2,1,2,1]\nif data[x-1]==data[y-1]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "x,y=list(map(int,input().split()))\na=[1,3,5,7,8,10,12]\nb=[4,6,9,11]\nc=[2]\nif x in a and y in a:\n    print(\"Yes\")\nelif x in b and y in b:\n    print(\"Yes\")\nelif x in c and y in c:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.15, "memory": 14336.0, "status": "done"}, {"code": "a = [1,3,5,7,8,10,12]\nb = [4,6,9,11]\nx,y = list(map(int,input().split()))\nprint((\"Yes\" if (x in a and y in a) or (x in b and y in b) else \"No\"))\n", "passed": true, "time": 0.15, "memory": 14136.0, "status": "done"}, {"code": "x, y = map(int, input().split())\na=[1,3,5,7,8,10,12]\nb=[4,6,9,11]\nif (x==y or (x in a and y in a) or (x in b and y in b)):\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.16, "memory": 14332.0, "status": "done"}, {"code": "a,b = map(int,input().split())\nx = [1,3,5,7,8,10,12]\ny = [4,6,9,11]\nif a == 2 or b == 2:\n    print(\"No\")\nelse:\n    if a in x and b in x:\n        print(\"Yes\")\n    elif a in y and b in y:\n        print(\"Yes\")\n    else:\n        print(\"No\")", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "x,y = map(int,input().split())\nA = [1,3,5,7,8,10,12]\nB = [4,6,9,11]\nC = [2]\n\nif x in A and y in A:\n  check = True\nelif x in B and y in B:\n  check = True\nelif x in C and y in C:\n  check = True\nelse:\n  check = False\n  \nprint(\"Yes\" if check else \"No\")", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "import sys, math\nfrom itertools import combinations as c, product as p\nfrom collections import deque\nsys.setrecursionlimit(10**9)\nINF = float('inf')\nMOD = 10**9 + 7\n#MOD = 998244353\n\n\ndef si(): return input()\ndef ii(): return int(input())\ndef fi(): return float(input())\ndef lstr(): return input().split()\ndef lint(): return list(map(int, input().split()))\ndef lintdec(): return list(map(lambda x:int(x) - 1, input().split()))\ndef lnstr(n): return [input() for _ in range(n)]\ndef lnint(n): return [int(input()) for _ in range(n)]\ndef lint_list(n): return [lint() for _ in range(n)]\n\n\n\n############################################################\nc = set(lint())\na = set([1, 3, 5, 7, 8, 10, 12])\nb = set([4, 6, 9, 11])\n\nif c & a == c or c & b == c:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "x,y = list(map(int,input().split()))\n\na = [1,3,5,7,8,10,12]\nb = [4,6,9,11]\n\nif x == 2 or y == 2:\n  print('No')\nelif x in a and y in a:\n  print('Yes')\nelif x in b and y in b:\n  print('Yes')\nelse:\n  print('No')\n", "passed": true, "time": 0.14, "memory": 14240.0, "status": "done"}, {"code": "x, y = map(int, input().split())\na = [1, 3, 5, 7, 8, 10, 12]\nb = [4, 6, 9, 11]\nc =[2]\nif x in a and y in a:\n  print(\"Yes\")\nelif x in b and y in b:\n  print(\"Yes\")\nelif x in c and y in c:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14148.0, "status": "done"}, {"code": "x, y = map(int, input().split())\na = [4, 6, 9, 11]\nb = 0\nc = 0\nif x == 2 or y == 2:\n    print(\"No\")\nelse:\n    if x in a:\n        b = 1\n    if y in a:\n        c = 1\n    if (b + c) % 2 == 0:\n        print(\"Yes\")\n    else:\n        print(\"No\")", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "x, y = list(map(int, input().split()))\n\ngroup_1 = {1, 3, 5, 7, 8, 10, 12}\ngroup_2 = {4, 6, 9, 11}\n\nif (x in group_1) and (y in group_1):\n    print('Yes')\nelif (x in group_2) and (y in group_2):\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14308.0, "status": "done"}, {"code": "x,y=map(int,input().split())\nG=\"121313113131\"\nprint([\"No\",\"Yes\"][G[x-1]==G[y-1]])", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "x, y = map(int, input().split())\nd = {1:1, 3:1, 5:1, 7:1, 8:1, 10:1, 12:1, 4:2, 6:2, 9:2, 11:2, 2:3}\nif d[x]==d[y]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.19, "memory": 14088.0, "status": "done"}, {"code": "s = \"0131212112121\"\nx,y = map(int,input().split())\nprint(\"Yes\" if s[x]==s[y] else \"No\")", "passed": true, "time": 0.15, "memory": 14228.0, "status": "done"}, {"code": "x,y = map(int,input().split())\ng = [[1,3,5,7,8,10,12],[4,6,9,11],[2]]\ns = 0\nfor i in range(3):\n    if x in g[i] and y in g[i]:\n        print(\"Yes\")\n        s = 1\nif s == 0:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "x,y = map(int, input().split())\na = [1,3,5,7,8,10,12]\nb = [4,6,9,11]\nif (x in a and y in a) or (x in b and y in b):\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14108.0, "status": "done"}, {"code": "print('YNeos'[len(set([0 if i==2 else [1,2][i in [4,6,9,11]] for i in list(map(int,input().split()))]))!=1::2])", "passed": true, "time": 0.15, "memory": 14304.0, "status": "done"}, {"code": "a, b = list(map(int, input().split()))\ns = {1, 3, 5, 8, 7, 10, 12}\nt = {4, 6, 9, 11}\nu = {2}\nif a in s and b in s:\n    print(\"Yes\")\nelif a in t and b in t:\n    print(\"Yes\")\nelif a in u and b in u:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "x,y = list(map(int,input().split()))\n\ns = [1,3,5,7,8,10,12]\ns1 = [4,6,9,11]\ns2 = [2]\n\nif x in s:\n    if y in s:\n        print('Yes')\n        return\nelif x in s1:\n    if y in s1:\n        print('Yes')\n        return\nelif x in s2:\n    if y in s2:\n        print('Yes')\n        return\n\nprint('No')\n", "passed": true, "time": 0.14, "memory": 14372.0, "status": "done"}, {"code": "G = [set([1,3,5,7,8,10,12]), set([4,6,9,11]), set([2])]\ndef check(x, y):\n  for g in G:\n    if x in g and y in g:\n      return True\n  return False\nx, y = list(map(int, input().split()))\nprint((\"Yes\" if check(x, y) else \"No\"))\n", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "lst = input().split()\n\nx = int(lst[0])\ny = int(lst[1])\n\nA = [1, 3, 5, 7, 8, 10, 12]\nB = [4, 6, 9, 11]\nC = [2]\n\ndef judge(L):\n   if (x in L) and (y in L):\n      return True\n   else:\n      return False\n\nif judge(A) or judge(B) or judge(C):\n   print('Yes')\nelse:\n   print('No')", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "r = list(map(int,input().split()))\na=[1,3,5,7,8,10,12]\nb=[4,6,9,11]\nc=[2]\nif r[0]==2 or r[0]==2:\n  print('No')\nelif len(list(set(r) & set(a))) == 2:\n  print('Yes')\nelif len(list(set(r) & set(b))) == 2:\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "lisa=[1,3,5,7,8,10,12]\nlisb=[4,6,9,11]\nlisc=[2]\nx,y=map(int,input().split())\nif (x in lisa)and(y in lisa):\n    print(\"Yes\")\nelif (x in lisb)and(y in lisb):\n    print(\"Yes\")\nelif (x in lisc)and(y in lisc):\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.23, "memory": 14292.0, "status": "done"}, {"code": "x, y = map(int, input().split())\n\ng1 = [1, 3, 5, 7, 8, 10, 12]\ng2 = [4, 6, 9, 11]\n\nprint(\"Yes\" if (x in g1 and y in g1) or (x in g2 and y in g2) else \"No\")", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "a = [1, 3, 5, 7, 8, 10, 12]\nb = [4, 6, 9, 11]\nc = [2]\nacount = 0\nbcount = 0\nccount = 0\n\nx, y = input().split()\n\nfor i in range(0, 7):\n    if int(x) == a[i] or int(y) == a[i]:\n        acount += 1\n\nfor i in range(0, 4):\n    if int(x) == b[i] or int(y) == b[i]:\n        bcount += 1\n\nif int(x) == c[0]:\n    ccount += 1\nif int(y) == c[0]:\n    ccount += 1\n\n\nif acount == 2 or bcount == 2 or ccount == 2:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n\n\n", "passed": true, "time": 0.14, "memory": 14132.0, "status": "done"}, {"code": "g = [[1, 3, 5, 7, 8, 10, 12], [4, 6, 9, 11], [2]]\nx, y = map(int, input().split())\nfor i in range(len(g)):\n    if x in g[i]:\n        xg = i\n    if y in g[i]:\n        yg = i\nif xg == yg:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "x, y = map(int, input().split())\n\ngr1=[1,3,5,7,8,10,12]\ngr2=[4,6,9,11]\ngr3=[2]\n\nif x in gr1 and y in gr1:\n    print('Yes')\nelif x in gr2 and y in gr2:\n    print('Yes')\nelif x in gr3 and y in gr3:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "x, y =map(int, input().split())\nif x in {1,3,5,7,8,10,12}:\n    x= 1\nelif x in {4,6,9,11}:\n    x =2\nelse:\n    x = 3\nif y in {1,3,5,7,8,10,12}:\n    y= 1\nelif y in {4,6,9,11}:\n    y =2\nelse:\n    y = 3\nprint(\"Yes\" if x == y else \"No\")", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "x,y=map(int,input().split())\ng1 = {1,3,5,7,8,10,12}\ng2 = {4,6,9,11}\ng3 = {2}\n\ndef group(z):\n  if z in g1:return 1\n  elif z in g2:return 2\n  else: return 3\n  \nif group(x)==group(y):print('Yes')\nelse:print('No')", "passed": true, "time": 0.14, "memory": 14164.0, "status": "done"}, {"code": "'''\nabc062 A - Grouping\nhttps://atcoder.jp/contests/abc062/tasks/abc062_a\n'''\n\ndirs = [{1, 3, 5, 7, 8, 10, 12}, {4, 6, 9, 11}, {2}]\n\ni = list(map(int, input().split()))\n\nfor dir in dirs:\n    if i[0] in dir and i[1] in dir:\n        print('Yes')\n        return\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "a,b=input().split()\na=int(a)\nb=int(b)\nl1=[1,3,5,7,8,10,12]\nl2=[4,6,9,11]\nif a in l1 and b in l1:\n  print(\"Yes\")\nelif a in l2 and b in l2:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "#k = int(input())\n#s = input()\n#a, b = map(int, input().split())\n#s, t = map(str, input().split())\n#l = list(map(int, input().split()))\n#l = [list(map(int,input().split())) for i in range(n)]\n#a = [list(input()) for _ in range(n)]\n\nx,y = list(map(int, input().split()))\n\ng1 = [1,3,5,7,8,10,12]\ng2 = [4,6,9,11]\ng3 = [2]\n\n\nif (x in g1 and y in g1):\n    print(\"Yes\")\nelif (x in g2 and y in g2):\n    print(\"Yes\")\nelif (x in g3 and y in g3):\n    print(\"Yes\")\nelse:\n    print(\"No\")\n\n\n", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}]