Problem:


Score : 100 points

Problem 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.

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

1 3

Sample Output 1

Yes

Sample Input 2

2 4

Sample Output 2

No



Sample input:
1 3


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
group_A=[1,3,5,7,8,10,12]
group_B=[4,6,9,11]
if x in group_A ==True and y in group_A ==True:
  print("Yes")
elif x in group_B == True and y in group_B ==True:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
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")
elif x in b and y in b:
    print("Yes")
elif x in c and y in c:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
if (x in a and y in a) or (x in b and y in b) or (x in c and y in c):
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
data=[[1,3,5,7,8,10,12],
      [4,6,9,11],
      [2]]
a=0
b=0
for i in range(0,3):
    for j in range(0,len(data[i])):
        if x==data[i][j]:
            a=i+1
for k in range(0,3):
    for l in range(0,len(data[k])):
        if x==data[k][l]:
            b=k+1
if a==b:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a = [1, 3, 5, 7, 8, 10, 12]
b = [4, 6, 9, 11]
c = [2]
acount = 0
bcount = 0
ccount = 0

x, y = input().split()

for i in range(0, 7):
    if int(x) == a[i] or int(y) == a[i]:
        acount += 1

for i in range(0, 4):
    if int(x) == b[i] or int(y) == b[i]:
        bcount += 1

if int(x) == c[0]:
    ccount += 1
if int(y) == c[0]:
    ccount += 1


if acount == 2 or bcount == 2 or ccount == 2:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
a = [1, 3, 5, 7, 8, 10, 12]
b = [4, 6, 9, 11]
c = [2]
acount = 0
bcount = 0
ccount = 0

x, y = input().split()

for i in range(0, 7):
    if int(x) == a[i] or int(y) == a[i]:
        acount += 1

for i in range(0, 4):
    if int(x) == b[i] or int(y) == b[i]:
        bcount += 1

for i in range(0, 1):
    if int(x) == c[0] or int(y) == c[0]:
        ccount += 2


if acount == 2 or bcount == 2 or ccount == 2:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
a = map(int, input().split())
input_list = list(a)

group_a = [1, 3, 5, 7, 8, 10, 12]
group_b = [4, 6, 9, 11]
group_c = [2]
list_of_list = [group_a, group_b, group_c]

count_match = 0

for list_i in list_of_list:
    if input_list in list_i:
        count_match += 1
        break

if count_match == 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

gr1=[1,3,5,7,8,10,12]
gr2=[4,6,9.11]
gr3=[2]

if x in gr1 and y in gr1:
    print('Yes')
elif x in gr2 and y in gr2:
    print('Yes')
elif x in gr3 and y in gr3:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if x>y:
  x,y=y,x
 
A=[1,3,5,7,8,10,12]
B=[4,6,9,11]
 
if x==2 or y==2:
  print('No')
elif (x in A and y in B):
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
n1 = set([1, 3, 5, 7, 8, 10, 12])
n2 = set([4, 6, 9, 11])
n3 = set([2])
nums = {map(int, input().split())}
print("Yes" if nums <= n1 or nums <= n2 or nums <= n3 else "No")

Submission status: Wrong Answer

Solution code:
n1 = [1, 3, 5, 7, 8, 10, 12]
n2 = [4, 6, 9, 11]
n3 = [2]
nums = [map(int, input().split())]
print("Yes" if nums in n1 or nums in n2 or nums in n3 else "No")

Submission status: Wrong Answer

Solution code:
f_1 = {1,3,5,7,8,10,12}
f_2 = {4,6,9,11}

x, y = map(int, input().split())
if (x in f_1) and (y in f_2):
  print("Yes")
elif (x in f_2) and (y in f_2):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
a = [4, 6, 9, 11]
b = 0
c = 0
if x == 2 or y == 2:
    print("No")
else:
    if x in a:
        b = 1
    elif y in a:
        c = 1
    if (b + c) % 2 == 0:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
a = [1, 3, 5, 7, 8, 10, 12]
b = [4, 6, 9, 11]
c = [2]
x, y = map(int, input().split())
if (x in a and y in a) or (x in b and y in b) or (x in c and y in c):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
a = [1, 3, 5, 7, 8, 10, 12]
b = [4, 6, 9, 11]
c = [2]
if (x in a and y in a) or (x in b and y in b) or (x in c and y in c):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
d={1:1,3:1,5:1,7:1,8:1,10:1,12:1,4:2,6:2,9:2,11:2,2:3}
a=list(map(int,input().split()))
if d[a[0]]==d[a[0]]: 
    print('Yes')
else: 
    print('No')

Submission status: Wrong Answer

Solution code:
H,W = [int(i) for i in input().split()]

if H % 3 == 0 or W % 3 == 0:
    print(0)
else:
    s = []
    for i in range(1,H//2 +1):
        j = W//2
        a = [i*W,j*(H-i),(W-j)*(H-i)]
        b = max(a) - min(a)
        s.append(b)
    for i in range(1,W//2+1):
        j = H//2
        a = [H*i,(W-i)*j,(W-i)*(H-j)]
        b = max(a) - min(a)
        s.append(b)

    print(min(s))

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if {x,y}<={1,3,5,7,8,10,12} or {x,y}<={2,4,6,9,11}:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
count=0
if x==a:
    if y==a:
        count+=1
    else:
        count+=0
if x!=a and x!=2:
    if y!=a and y!=2:
        count+=1
    else:
        count+=0
if x==2:
    if y==2:
        count+=1
    else:
        count+=0
if count!=0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a=[0,1,3,1,2,1,2,1,1,2,1,2,1]

x,y=map(int,input().split())
if a[x]==a[y]:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
count=0
for i in a:
    if x==a:
        if y==a:
            count+=1
        else:
            count+=0
    if x!=a and x!=2:
        if y!=a and y!=2:
            count+=1
        else:
            count+=0
if x==2:
    if y==2:
        count+=1
    else:
        count+=0
if count!=0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
L = [[1, 3, 5, 7, 8, 10, 12],[4, 6, 9, 11],[2]]
x, y = map(int,input().split())
ans = True
for i in range(len(L)):
  if x in L[i] and y in L[i]:
    ans = True
if ans:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

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

if (x in a) & (y in a):
  print("YES")
elif (x in b) & (y in b):
  print("YES")
elif (x in c) & (y in c):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split())

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")
elif (x in b) and (y in b):
  print("YES")
elif (x in c) and (y in c):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split())

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")
elif x in b and y in b:
  print("YES")
elif x in c and y in c:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

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")
elif x in b and y in b:
  print("YES")
elif x in c and y in c:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

a = [1,3,5,7,8,12]
b = [4,6,9,11]
c = [2]

if (x in a) and (y in a):
  print("YES")
elif (x in b) and (y in b):
  print("YES")
elif (x in c) and (y in c):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split())
#print(x,y)

a = [1,3,5,7,8,12]
#print(a)
b = [4,6,9,11]
c = [2]

if (x in a) and (y in a):
  print("YES")
elif (x in b) and (y in b):
  print("YES")
elif (x in c) and (y in c):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split())
#print(x,y)

a = [1,3,5,7,8,12]
#print(a)
b = [4,6,9,11]
c = [2]

if x in a and y in a:
  print("YES")
elif x in b and y in b:
  print("YES")
elif x in c and y in c:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
#print(x,y)

a = [1,3,5,7,8,12]
#print(a)
b = [4,6,9,11]
c = [2]

if x in a and y in a:
  print("YES")
elif x in b and y in b:
  print("YES")
elif x in c and y in c:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
#print(x,y)

a = [1,3,5,7,8,12]
#print(a)
b = [4,6,9,11]
c = 2

if x in a and y in a:
  print("YES")
elif x in b and y in b:
  print("YES")
elif x==c and y==c:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
d={s:1 for s in [4,6,9,11]}
for i in [1,3,5,7,8,10,12]:
    d[i]=0
d[2]=2
a,s=map(int,input().split())
print("Yes")if d[a]==d[a] else print("No")

Submission status: Wrong Answer

Solution code:
import sys
x,y = map(int,input().split())

if x <= 0 or x >= 13 or y <= 0 or y >= 13:
    sys.exit()
if x >= y:
    sys.exit()

A = (1, 3, 5, 7, 8, 10, 12)
B = (4, 6, 9, 11)

if x == 2 or y == 2:
    print("No")
    sys.exit()
if x in A and y in A:
    print("Yes")
    sys.exit()
if x in B and y in B:
    print("Yes")
    sys.exit()

Submission status: Wrong Answer

Solution code:
import sys
x,y = map(int,input().split())

if x <= 0 or x >= 13 or y <= 0 or y >= 13:
    sys.exit()
if x >= y:
    sys.exit()

A = (1, 3, 5, 7, 10, 12)
B = (4, 6, 9, 11)

if x == 2 or y == 2:
    print("No")
    sys.exit()
if x in A and y in A:
    print("Yes")
    sys.exit()
if x in B and y in B:
    print("Yes")
    sys.exit()

Submission status: Wrong Answer

Solution code:
print(' YNeos'[len(set([2 if i==2 else 1 if i==[4,6,9,11] else 0 for i in list(map(int,input().split()))]))::2])

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

A = [1, 3, 5, 7, 8, 10, 12]
B = [4, 6, 9, 11]

if x in A:
    x = "A"
if x in B:
    x = "B"
else:
    x = "C"

if y in A:
    y = "A"
if y in B:
    y = "B"
else:
    y = "C"

if x == y:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
C = [2]

x,y= map(int, input().split())
if (x in A and y in B) or (x in B and y in B):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
C = [2]

x,y= map(int, input().split())
if (x,y in A) or (x,y in B):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

dic = {'A': [1, 3, 5, 7, 8, 10, 12], 'B': [4, 5, 6, 11], 'C': [2]}

gx = 0
gy = 0
for key, value in dic.items():
    if x in value:
        gx = key
    if y in value:
        gy = key
ans = 'Yes' if gx == gy else 'No'
print(ans)

Submission status: Wrong Answer

Solution code:
a1 = [1,3,5,7,8,10,12]
a2 = [4,6,9,11]
a3 = [2]

x,y = list(map(int,input().strip().split()))

if x in a1:
  _x = 0
elif x in a1:
  _x = 1
else:
  _x = 2
if y in a1:
  _y = 0
elif y in a1:
  _y = 1
else:
  _y = 2
  
if _x == _y:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x,y=input().split()
l=['1','3','5','7','8','10','12','4','6','9','11','2']
x_loc=l.index(x)
y_loc=l.index(y)

if x_loc==11 and y_loc==11:
    print('Yes')
elif x_loc<7 and y_loc<7:
    print('Yes')
elif x_loc>6 and x_loc<11 and y_loc>11 and y_loc>11:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
print("No" if 2 in [int(x) for x in input().split()] else "Yes")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())

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

for i in a:
  if x==i:
    x='a'
  if y==i:
    y='a'

for i in b:
  if x==i:
    x='b'
  if y==i:
    y='b'

for i in c:
  if x==i:
    x='c'
  if y==i:
    y='c'

if x==y:
  print('yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
g1=[1,3,5,7,8.10,12]
g2=[4,6,9,11]
g3=[2]
if x in g1 and y in g1:
    print('Yes')
elif x in g2 and y in g2 :
    print('Yes')
elif x in g3 and y in g3 :
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
A = [1,3,5,7,10,12]
B = [4,6,9,11]
a,b = map(int, input().split())
if ((a in A)and(b in A)) or ((a in B) and (b in B)) or a == b == 2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
x,y = map(int, input().split())
if (x in a and b in a) or (x in b and y in b):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if (x==y==1,3,5,7,8,10,12) or (x==y==4,6,9,11) or (x==y==2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = list(map(int,input().split()))
if x in [1,3,5,7,8,10,12] and x in [1,3,5,7,8,10,12] or x in [4,6,9,11] and y in [4,6,9,11] or x == 2 and y == 2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:

x = input()
ls_x = x.split()

# print(ls_x)

for i in range(len(ls_x)):
    ls_x[i] = int(ls_x[i])

gA = [1,3,5,7,8,10,12]
gB = [4,6,9,11]

if ls_x[0] == 2 or ls_x[1] == 2:
    print("No")

if ls_x[0] == gA[i] and ls_x[1] == gA[i]:
    print("Yes")


if ls_x[0] == gB[i] and ls_x[1] == gB[i]:
    print("Yes")
else:
    ("No")

Submission status: Wrong Answer

Solution code:
x = input()
ls_x = x.split()

# print(ls_x)

for i in range(len(ls_x)):
    ls_x[i] = int(ls_x[i])

gA = [1,3,5,7,8,10,12]
gB = [4,6,9,11]

if ls_x[0] == 2 or ls_x[1] == 2:
    print("No")

if ls_x[0] == gA[i] and ls_x[1] == gA[i]:
    print("Yes")
else:
    print("No")

if ls_x[0] == gB[i] and ls_x[1] == gB[i]:
    print("Yes")
else:
    ("No")

Submission status: Wrong Answer

Solution code:
x = input()
ls_x = x.split()

print(ls_x)

for i in range(len(ls_x)):
    ls_x[i] = int(ls_x[i])

gA = [1,3,5,7,8,10,12]
gB = [4,6,9,11]

if ls_x[0] == 2 or ls_x[1] == 2:
    print("No")

if ls_x[0] == gA[i] and ls_x[1] == gA[i]:
    print("Yes")
else:
    print("No")

if ls_x[0] == gB[i] and ls_x[1] == gB[i]:
    print("Yes")
else:
    ("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
xgroup = ''
ygroup = ''
a = [1, 3, 5, 7, 8, 10, 12]
b = [4, 9, 11]
c = [2]
for i in a:
    if x == i:
        xgroup = 'a'
for i in a:
    if y == i:
        ygroup = 'a'
for i in b:
    if x == i:
        xgroup = 'b'
for i in b:
    if y == i:
        ygroup = 'b'
for i in c:
    if x == i:
        xgroup = 'c'
for i in c:
    if y == i:
        ygroup = 'c'
if xgroup == ygroup:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
a = {1, 3, 5, 7, 8, 10, 12}
b = {4, 6, 9 ,11}
c = {2}
if x in a and y in a or x in b and y in b and x in c and y in c:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
if a.count(x)==a.count(y):
    print("Yes")
elif b.count(x)==b.count(y):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
f=0
g=0
x,y=map(int,input().split())
for i in range(len(a)):
    if a[i]==x:
        for j in range(len(a)):
            if a[j]==y:
                print("Yes")
                f=1
                break;
     
    if f==1:
        break;
    
if f==0:
    for k in range(len(b)):
        if b[k]==x:
            for j in range(len(b)):
                if b[j]==y:
                    print("Yes")
                    g=1
                    break;
        if g==1:
            break;
        elif x==2 and y==2:
            print("Yes")
            break;
        else:    
            print("No")
            break;

Submission status: Wrong Answer

Solution code:
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
f=0
g=0
x,y=map(int,input().split())
for i in range(len(a)):
    if a[i]==x:
        for j in range(len(a)):
            if a[j]==y:
                print("Yes")
                f=1
                break;
     
    if f==1:
        break;
if f==0:
    for k in range(len(b)):
        if b[k]==x:
            for j in range(len(b)):
                if b[j]==y:
                    print("Yes")
                    g=1
                    break;
        if g==1:
            break;
        else:
            print("No")
            break;

Submission status: Wrong Answer

Solution code:
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
f=0
g=0
x,y=map(int,input().split())
for i in range(len(a)):
    if a[i]==x:
        for j in range(len(a)):
            if a[j]==y:
                print("YES")
                f=1
                break;
     
    if f==1:
        break;
if f==0:
    for k in range(len(b)):
        if b[k]==x:
            for j in range(len(b)):
                if b[j]==y:
                    print("YES")
                    g=1
                    break;
        if g==1:
            break;
        else:
            print("NO")
            break;

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
n=[1,3,5,7,8,10,12]
m=[4,6,9,11]
o=[2]
p=[n,m,o]
if p.count(a)==p.count(b):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())

g1=[1,3,5,7,8,10,12]
g2=[4,6,9,11]

if x in g1 and y in g1:
    print('Yes')
elif x in g2 and y in g2:
    print('No')
elif x==2 and y==2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int, input().split())
if x==2 and y==2:
  print('Yes')
elif x==2 or y==2:
  print('No')

a=[4,6,9,11]
if (x in a) and (y in a):
  print('Yes')
elif (x not in a) and (y not in a):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int, input().split())
if x==2 or y==2:
  print('No')

a=[4,6,9,11]
if (x in a) and (y in a):
  print('Yes')
elif (x not in a) and (y not in a):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int, input().split())
if x==2 or y==2:
  print('No')

a=[4,6,9,11]
if x in a and y in a:
  print('Yes')
elif x not in a and y not in a:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

if a == 2 :
  print('No')
elif a == 1 or 3 or 5 or 7 or 8 or 10 or 12:
  if b == 3 or 5 or 7 or 8 or 10 or 12:
    print('Yes')
  else:
    print('No')
elif a == 4 or 6 or 9 or 11:
  if b == 6 or 9 or 11:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

if a == 2 :
  print('No')
elif a == 1 or 3 or 5 or 7or 8or 10or 12:
  if b == 3 or 5 or 7or 8or 10or 12:
    print('Yes')
  else:
    print('No')
elif a == 4 or 6 or 9or 11:
  if b == 6 or 9 or 11:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

if a == 2 or b == 2:
  print('No')
elif a == 1 or 3 or 5 or 7or 8or 10or 12:
  if b == 3 or 5 or 7or 8or 10or 12:
    print('Yes')
  else:
    print('No')
elif a == 4 or 6 or 9or 11:
  if b == 6 or 9 or 11:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
print("Yes" if (x!=2 and y!=2) and ((x%2==0 and y%2==0) or (x%2!=0 and y%2!=0)) else "No")

Submission status: Wrong Answer

Solution code:
def resolve():
	a = [1, 3, 5, 6, 8, 10, 12]
	b = [4, 6, 9, 11]
	c = [2]

	x, y = map(int, input().split())
	if x in a and y in a:
		print("Yes")
	elif x in b and y in b:
		print("Yes")
	else:
		print("No")
resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
	a = [1, 3, 5, 6, 8, 10, 12]
	b = [4, 6, 9, 11]
	c = [2]

	x, y = map(int, input().split())
	if x in a and y in a:
		print("Yes")
	elif x in b and y in b:
		print("Yes")
	elif x in c and y in c:
		print("Yes")
	else:
		print("No")
resolve()

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())


def group(v):
    if v in [1, 3, 5, 7, 8, 10, 12]:
        return 1
    else:
        return 2


if group(x) == group(y):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
if a == (1 or 3 or 5 or 7 or 8 or 10 or 12) and b == (1 or 3 or 5 or 7 or 8 or 10 or 12):
  print('Yes')
elif a == (4 or 6 or 9 or 11) and b == (4 or 6 or 9 or 11):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
if a == 2 or b == 2:
  print('No')
elif a == (4 or 6 or 9 or 11):
  if b == (4 or 6 or 9 or 11):
    print('Yes')
  else:
    print('No')
else:
  if b == (4 or 6 or 9 or 11 or 2):
    print('No')
  else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
if a == 2 or b == 2:
  print('No')
elif a == (4 or 6 or 9 or 11):
  if b == (4 or 6 or 9 or 11):
    print('Yes')
  else:
    print('No')
else:
  if b == (4 or 6 or 9 or 11):
    print('No')
  else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
if a == 2 or b == 2:
  print('No')
elif a == (4 or 6 or 9 or 11):
  if b == (4 or 6 or 9 or 11):
    print('Yes')
  else:
    print('No')
else:
  if b == (4 or 6 or 9 or 11):
    print('No')
  else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
a = [1, 3, 5, 7, 8, 10, 12]
b = [4, 6, 9, 11]

x, y = map(int,input().split())

if a.count(x) == a.count(y) or b.count(x) == b.count(y):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
list = ['1', '3', '5', '7', '8', '10', '12']
list1 = ['4', '6', '9', '11']
list2 = ['2']

x, y = map(int, input().split())
if x in list and y in list:
    print("Yes")
elif x in list1 and y in list1:
    print("Yes")
elif x in list2 and y in list2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = [0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0]
x, y = map(int, input().split())
x -= 1
y -= 1
if a[x] == a[y]:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())
if a==2 or b==2:
  print('No')
elif (a-4)*(a-6)*(a-9)*(a-12)==0 and (b-4)*(b-6)*(b-9)*(b-12)==0:
  print('Yes')
elif (a-1)*(a-3)*(a-5)*(a-7)*(a-8)*(a-12)==0 and (b-1)*(b-3)*(b-5)*(b-7)*(b-8)*(b-12)==0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
a=[1,3,5,7,8,9,12]
b=[4,6,9,11]
c=[2]
if ((x in a)and(y in a))\
    or((x in b)and(y in b))\
    or((x in c)and(y in c)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

if a in {1,3,5,7,8,10,12} and b in {1,3,5,7,8,10,12}:
    print("Yes")
if a in{2} and b in {2}:
    print("Yes")
if a in {4,6,9,11} and b in {4,6,9,11}:
    print("Yes")   

else:
    print("No")

Submission status: Wrong Answer

Solution code:
def main():
    group_A = [1, 3, 5, 7, 8, 10, 12]
    group_B = [4, 6, 9, 11]
    group_C = [2]

    x, y = map(int, input().split())

    if x == 2 or y == 2:
        print("No")
    elif (x in group_A and y in group_A) or (x in group_B and y in group_B):
        print("Yes")
main()

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())
if x==2 or y==2:
  print("No")
  exit()

if x==4 or x==6 or x==9 or x==11:
  if y==4 or y==6 or y==9 or y==11:
    print("Yes")
  else:
    print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
a=[1,3,5,7,8,12]
b=[4,6,9,11]
if (x in a and y in a) or (x in b and y in b):print("Yes")
else:print("No")

Submission status: Wrong Answer

Solution code:
l = list(input().split())
a = ["1","3","5","7","8","10","12"]
b = ["4","6","9","11"]
c = ["2"]
if a >= l or b >= l:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
l = list(map(int,input().split()))
a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
c = [2]
if a >= l or b >= l:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
A=[1,3,5,7,10,12]
B=[4,6,9,11]
C=[2]
print("Yes" if x in A and y in A else "Yes" if x in B and y in B else "Yes" if x in C and y in C else "No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
A=[1,3,5,6,7,10,12]
B=[4,6,9,11]
C=[2]
print("Yes" if x in A and y in A else "Yes" if x in B and y in B else "Yes" if x in C and y in C else "No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if x==2 or y==2:
    print("No")
elif (x==4 and y==6,9,11) or (x==6 and y==9,11) or (x==9 and y==11):
    print("Yes")
elif (x==1 and y==3,5,7,8,10,12) or (x==3 and y==5,7,8,10,12) or (x==5 and y==7,8,10,12) or (x==7 and y==8,10,12) or (x==8 and y==10,12) or (x==10 and y==12):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = [int(i) for i in input().split()]

gr = [4,6,9,11]
gr2 = [1,3,5,7,8,10.12]

if (x ==2) | (y ==2):
    print("No")
    
elif (x in gr) & (y in gr):
    print("Yes")
elif (x in gr2) & (y in gr2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = [int(i) for i in input().split()]

gr = [4,6,9,11]

if (x ==2) | (y ==2):
    print("No")
    
elif (x in gr) & (y in gr):
    print("Yes")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
a = [1, 3, 5, 7, 7, 8, 10, 12]
b = [4, 6, 9, 11]
if x == 2 or y == 2:
	print('No')
elif x in b and x in b:
	print('Yes')
elif x in a and x in a:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())

# a,b = map(int, "1 3".split())

listb = [4,6,9,11]

tmp = a in listb

if (a == 2 and b ==2):
    print("Yes")
elif (a in listb and b in listb):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())


listb = [4,6,9,11]

tmp = a in listb

print(tmp)

if (a == 2 and b ==2):
    print("Yes")
elif (a in listb and b in listb):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())


listb = [4,6,9,11]

tmp = a in listb

print(tmp)

if (a == 2 and b ==2):
    print("YES")
elif (a in listb and b in listb):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:

x,y = map(int,input().split())

a = [1,3,5,7,8,10,12]
b = [4,6,9,11]

if x in a and y in a:
    print("Yes")
elif x in b and y in a:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

l1 = [1,3,5,7,8,10,12]
l2 = [4,6,9,11]
x,y = iim()

if (x in l1 and y in l2) or (x in l2 and y in l2):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
A=[1,3,5,7,8,10,12]
B=[4,6,9,11]
C=[2]
print('Yes' if (x in A and y in A) or (x in B and y in B) or (x in C or y in C) else "No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
A=[1,3,5,7,8,10,12]
B=[4,6,9,11]
C=[2]
i=A or B or C
if x in i and y in i:print('Yes')
else:print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int, raw_input() .split())
list1 = [1, 3, 5, 7, 8, 10, 12]
list2 = [4, 6, 9, 11]
list3 = [2]
if x and y in list1 or list2 or list3:
    print "Yes"
else:
    print "No"

Submission status: Wrong Answer

Solution code:
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
x,y=map(int,raw_input().split())
ans= "No"
if x in a and y in b:
  ans= "Yes"
elif x in b and y in b:
  ans = "Yes"
print ans

Submission status: Wrong Answer

Solution code:
def func(a):
  if a in (1,3,5,7,8,10,12):
    return "a"
  elif a in (4,6,9,11):
    return "b"
  else:
    return "c"

x, y = [int(i) for i in input().split()]

x_group = func(x)
y_group = func(x)

if x_group == y_group:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
#import sys
#sys.setrecursionlimit(500000)　マージテクをちゃんとしていればこんなものはいらないはず……

class UF:
    #経路圧縮＋マージテクのunion find木
    def __init__(self,n):
        self.n = n
        self.parents = [-1] * (n+1) #1-indexedにするために１個足している
        self.rnks = [0] * (n+1)

    def find(self,n):
        if self.parents[n] < 0:
            return n
        else:
            return self.find(self.parents[n])


    def union(self,a,b):
        a_par = self.find(a)
        b_par = self.find(b)

        if a_par == b_par:
            return
        ##union by rank
        #if self.rnks[a_par] < self.rnks[b_par]: #ランクの高い方の根に低い方の根をつける　逆にしないように……！
        #    a_par,b_par = b_par,a_par
        #if self.rnks[a_par] == self.rnks[b_par]:
        #    self.rnks[a_par] += 1
        if self.size(a_par) < self.size(b_par): #parentsの値が負の数のとき、それはその木のサイズを表す。
            a_par,b_par = b_par,a_par
        self.parents[a_par] += self.parents[b_par]
        self.parents[b_par] = a_par

    def size(self,n):
        par = self.find(n)
        return abs(self.parents[par])

    def is_same(self,a,b):
        return self.find(a) == self.find(b)

def main():
    uf = UF(12)
    uf.union(1,3)
    uf.union(1,5)
    uf.union(1,7)
    uf.union(1,8)
    uf.union(1,10)
    uf.union(1,12)

    uf.union(4,6)
    uf.union(4,9)
    uf.union(4,11)

    x,y = map(int,input().split())
    print("Yes" if uf.is_same(x,y) else "No")

Submission status: Wrong Answer

Solution code:
# A - Grouping
a=['1','3','5','7','8','10','12']
b=['4','6','9','11']
x,y=list(map(int,input().split()))
if x in a and y in a:
    print("Yes")
elif x in b and y in b:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
l = [[1,3,5,7,8,10,12], [4,6,9,11], [2]]
a, b = map(int, input().split())

for i in l:
  if a in i and b in i:
    print('Yes')
    break
  else:
    print('No')
    break

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

x,y=[int(i) for i in input().rstrip().split()]

g1={1,3,5,7,8,10,12}
g2={4,6,9,11}
g3={2}

for G in [g1,g2,g3] :
  if all( n in G for n in [x,y] ):
    print("YES")
    break
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
A=[1,3,5,7,8,10,12]
B=[4,6,9,11]
C=[2]

while True:
    for l in A,B,C:
        if x in l and y in l:
            print('Yes')
            break
    break    
    print('No')
    break

Submission status: Wrong Answer

Solution code:
list1 = [1, 3, 5, 7, 8, 10, 12]
list2 = [4, 6, 9, 11]
list3 = [2]

num = map(int, input().split())

if num in list1 or num in list2 or num in list3:
  print('Yes')
else:
  print('No')