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: Runtime Error

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


x = int(input("x = "))
y = int(input("y = "))
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: Runtime Error

Solution code:
nput().split());a=[4,6,9,11];b=[1,3,5,7,8,10,12];print(['No','Yes'][(x in a and y in a)+x in b and y in b])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
H, W = list(map(int,input().split()))


blank = ["#" for i in range(W + 2)]
print("".join(blank))
for line in range(H):
    print("#" + input() + "#")
print("".join(blank))

Submission status: Runtime Error

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

for i in range(W+2):
        print("#", end = "")
print("")

for i in range(H):
        print("#", end = "")
        print(str[i], end = "")
        print("#")

for i in range(W+2):
        print("#", end = "")
print("")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
x, y = map(int, input().split())

#def list
list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]

#group check
if x in list1 and y in list1:
    print "YES"
elif x in list2 and y in list2:
    print "YES"
elif x in list3 and y in list3:
    print "YES"
else:
    print "NO"

Submission status: Runtime Error

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

#def list
list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]

#group check
if x in list1 and y in list1:
    print 'YES'
elif x in list2 and y in list2:
    print 'YES'
elif x in list3 and y in list3:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

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

argv = sys.argv
x = int(argv[1])
y = int(argv[2])

#def list
list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]

#group check
if x in list1 and y in list1:
    print 'YES'
elif x in list2 and y in list2:
    print 'YES'
elif x in list3 and y in list3:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

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

argv = sys.argv
x = int(argv[1])
y = int(argv[2])

print argv
print x
print y

#range check
if 1 <= x < y <= 12:
    pass
else:
    print 'invalid range'

#def list
list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]

#group check
if x in list1 and y in list1:
    print 'YES'
elif x in list2 and y in list2:
    print 'YES'
elif x in list3 and y in list3:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
import sys
argv = sys.argv
x = int(argv[1])
y = int(argv[2])

#範囲チェック
if 1 <= x < y <= 12:
    pass
else:
    print 'invalid range'

#リストの定義
list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]

#グループのチェック
if x in list1 and y in list1:
    print 'YES'
elif x in list2 and y in list2:
    print 'YES'
elif x in list3 and y in list3:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
size = input()
size = size.split()

print("#" * (int(size[1]) + 2))

for i in range(int(size[0])):
	row = input()
	print("#" + row + "#")

print("#" * (int(size[1]) + 2))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
argv = sys.argv
x = int(argv[1])
y = int(argv[2])

#範囲チェック
if 1 <= x < y <= 12:
    pass
else:
    print 'invalid range'

#リストの定義
list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]

#グループのチェック
if x in list1 and y in list1:
    print 'YES'
elif x in list2 and y in list2:
    print 'YES'
elif x in list3 and y in list3:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
listA = [1, 3, 5, 7, 8, 10, 12]
listB = [4, 6, 9, 11]
listC = [2]

N = [int(i) for i in input().split()]

for i in range(2):
	a[i] = N[i] in listA
	b[i] = N[i] in listB
	c[i] = N[i] in listC

if a[0] == a[1]:
	print "yes"
elif b[0] == b[1]:
	print "yes"
elif c[0] == c[1]:
	print "yes"
else:
	print "no"

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
argv = sys.argv
x = int(argv[1])
y = int(argv[2])

#範囲チェック
if 1 <= x < y <= 12:
    pass
else:
    print 'invalid range'
    sys.exit()

#リストの定義
list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]

#グループのチェック
if x in list1 and y in list1:
    print 'YES'
elif x in list2 and y in list2:
    print 'YES'
elif x in list3 and y in list3:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
argv = sys.argv
x = int(argv[1])
y = int(argv[2])

#範囲チェック
if 1 <= x < y <= 12:
    print 'correct range'
else:
    print 'invalid range'
    quit()

#リストの定義
list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]

#グループのチェック
if x in list1 and y in list1:
    print 'YES'
elif x in list2 and y in list2:
    print 'YES'
elif x in list3 and y in list3:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

Solution code:
 b.py  a.py                                                                    X
l = raw_input().split(" ")


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

ans="No"

if (l[0] in a and l[1] in a):
    ans="Yes"
if (l[0] in b and l[1] in b):
    ans="Yes"
if (l[0] in c and l[1] in c):
    ans="Yes"

print(ans)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
argv = sys.argv
x = int(argv[1])
y = int(argv[2])

#範囲チェック
if 1 <= x < y <= 12:
    print 'OK'
else:
    print 'NG'
    quit()

#リストの定義
list1 = [1,3,5,7,8,10,12]
list2 = [4,6,9,11]
list3 = [2]

#グループのチェック
if x and y in list1:
    print 'YES'
else:
    print 'NO'

Submission status: Runtime Error

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

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

if x in list1:
	if y in list1:
		print("Yes")
	else:
		pirnt("No")
elif x in list2:
	if y in list2:
		print("Yes")
	else:
		print("No")
else:
	if y in list3:
		print("Yes")
	else:
		print("No")

Submission status: Runtime Error

Solution code:
l = raw_input().split(" ")


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

ans="NO"

if (l[0] in a and l[1] in a):
    ans="YES"
if (l[0] in b and l[1] in b):
    ans="YES"
if (l[0] in c and l[1] in c):
    ans="YES"

print(ans)