import numpy as np

lis = np.array([[1,3,5,7,8,10,12],[4,6,9,11],[2]]);a,b = list(map(int,input().split()))

for i in lis:

    if a in i and b in i:print("Yes");exit()

print("No")

lis = [[1,3,5,7,8,10,12],[4,6,9,11],[2]];a,b = list(map(int,input().split()))

for i in lis:

    if a in i and b in i:print("Yes");exit()

print("No")

import numpy as np

lis = np.array([[1, 3, 5, 7, 8, 10, 12], [4, 6, 9, 11], [2]])
a, b = list(map(int, input().split()))
for i in lis:
    if a in i and b in i:
        print("Yes")
        exit()
print("No")

lis = [[1, 3, 5, 7, 8, 10, 12], [4, 6, 9, 11], [2]]
a, b = list(map(int, input().split()))
for i in lis:
    if a in i and b in i:
        print("Yes")
        exit()
print("No")

-import numpy as np - -lis = np.array([[1, 3, 5, 7, 8, 10, 12], [4, 6, 9, 11], [2]]) +lis = [[1, 3, 5, 7, 8, 10, 12], [4, 6, 9, 11], [2]]