Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

print(a * b, 2 * (a+b))

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))

Buggy python submission (verdict: Runtime Error):
a, b = raw_input()
print(a * b, 2 * (a+b))

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))

Buggy python submission (verdict: Runtime Error):
a, b = raw_input, raw_input
print(a * b, 2*(a+b))

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))

Buggy python submission (verdict: Runtime Error):
a, b = int(raw_input()), int(raw_input())
print(a * b, 2*(a+b))

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))

Buggy python submission (verdict: Runtime Error):
a, b = int(raw_input()), int(raw_input())
print(a * b, 2*(a+b))

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))

Buggy python submission (verdict: Runtime Error):
a, b = int(input()), int(input())
S = a * b
R = 2 * (a+b)
print(S, R)

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))

Buggy python submission (verdict: Runtime Error):
a, b = int(input(), input())
S = a * b
R = 2 * (a+b)
print(S, R)

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))

Buggy python submission (verdict: Runtime Error):
a, b = input(), input()
S = a * b
R = 2 * (a+b)
print(S, R)

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))

Buggy python submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())

print(a*b, 2*(a+b))

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))

Buggy python submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())

print(a*b, 2*(a+b))

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))

Buggy python submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())

print(a*b, 2*(a+b))

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a*b) + " " + str(2*(a+b)))
Buggy python submission (verdict: Runtime Error):
TimeS = raw_input()
TimeM = timeS / 60
sec = time % 60
hou = TimeM / 60
min = TimeM % 60

print(str(hou)+ ":"+ str(min)+ ":"+ str(sec))

Fixed submission:
TimeS = int(raw_input())
TimeM = TimeS / 60
sec = TimeS % 60
hou = TimeM / 60
min = TimeM % 60

print(str(hou)+ ":"+ str(min)+ ":"+ str(sec))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, raw_input().split())

if a < b < c:
  print'"Yes")
else:
  print("No")

Fixed submission:
a, b, c = map(int, raw_input().split())

if a < b < c:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n = []
i = 0

while True:
  n.append(input())
  if n[i] == 0:
    break
  i += 1

for j in range(i-1):
  print(???case ??? + str(i+1) + ??? : ??? + str(n[i]))

Fixed submission:
n = []
i = 0

while True:
  n.append(int(input()))
  if n[i] == 0:
    break
  i += 1

for j in range(i):
  print("Case " + str(j+1) + ": " + str(n[j]))
Buggy python submission (verdict: Runtime Error):
x = []
y = []
i = 0

while True:
  a, b = map(int, input().split())
  if b < a:
    stock = a
    a = b
    b = stock
  x.append(a)
  y.append(b)
  if x[i] == 0 and y[i] == 0:
    break
  i += 1

for j in range(i):
  print(str(x[j]), str(y[j]))

Fixed submission:
x = []
y = []
i = 0

while True:
  a, b = map(int, input().split())
  if b < a:
    stock = a
    a = b
    b = stock
  x.append(a)
  y.append(b)
  if x[i] == 0 and y[i] == 0:
    break
  i += 1

for j in range(i):
  print(str(x[j]), str(y[j]))
Buggy python submission (verdict: Runtime Error):
import math

r = int(input())

S = math.pi * r**2
L = 2 * math.pi * r

print(S, L)

Fixed submission:
import math

r = float(input())

S = math.pi * r**2
L = 2 * math.pi * r

print(S, L)

Buggy python submission (verdict: Runtime Error):
import math

r = int(input())

S = math.pi * r**2
L = 2 * math.pi * r

print("%.6f"% S, "%.6f"% L)

Fixed submission:
import math

r = float(input())

S = math.pi * r**2
L = 2 * math.pi * r

print(S, L)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = map(int, input().split())

for i in range(1, n+1):
    print(str(a[-i]) + " ", end = "")
print()

Fixed submission:
n = int(input())
a = input().split()

for i in range(1, n):
    print(str(a[-i]) + " ", end = "")
print(a[0])

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = map(int, input().split())

for i in range(1, n):
    print(str(n[-i]) + " ", end="")
print(n[0])

Fixed submission:
n = int(input())
a = input().split()

for i in range(1, n):
    print(str(a[-i]) + " ", end = "")
print(a[0])

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = map(int, input().split())

for i in range(1, n):
    print(str(a[-i]) + " ", end="")
print(a[0])

Fixed submission:
n = int(input())
a = input().split()

for i in range(1, n):
    print(str(a[-i]) + " ", end = "")
print(a[0])
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
A = []
B = []
for i in range(n):
    A.append(map(int, input().split()))
for i in range(m):
    B.append(int(input()))

C = []
for i in range(n):
    C.append(0)
    for j in range(m):
        C[i] += A[i][j] * B[j]
        print(C[i])

Fixed submission:
n, m = map(int, input().split())
A = []
B = []
for i in range(n):
    A.append(input().split())
for i in range(m):
    B.append(int(input()))

C = []
for i in range(n):
    C.append(0)
    for j in range(m):
        C[i] += int(A[i][j]) * B[j]
    print(C[i])

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
A = []
B = []
for i in range(n):
    A.append(map(int, input().split()))
for i in range(m):
    B.append(int(input()))

C = []
for i in range(n):
    C.append(0)
    for j in range(m):
        C[i] += int(A[i][j]) * B[j]
    print(C[i])

Fixed submission:
n, m = map(int, input().split())
A = []
B = []
for i in range(n):
    A.append(input().split())
for i in range(m):
    B.append(int(input()))

C = []
for i in range(n):
    C.append(0)
    for j in range(m):
        C[i] += int(A[i][j]) * B[j]
    print(C[i])
Buggy python submission (verdict: Runtime Error):
def matrix(n):
    x = [[0 for i in range(n)] for j in range(n))]
    for l in range(2, len(n)+1):
        for i in range(0, len(n)-l+1):
            j = i + l - 1
            x[i][j] = min(x[i][k] + x[k+1][j] + X[i][0]*X[k][1]*X[j][1] for k in range(i, j))

    print x[0][len(n)-1]

n = input()
X = []

for i in range(n):
    X.append(map(int, raw_input().split()))

matrix(X)

Fixed submission:
def matrix(X):
    m = [[0 for i in range(len(X))] for j in range(len(X))]

    for l in range(2, len(X) + 1):
        for i in range(0, len(X) - l + 1):
            j = i + l - 1
            m[i][j] = min(m[i][k] + m[k + 1][j] + X[i][0]*X[k][1]*X[j][1] for k in range(i, j))

    print m[0][len(X) - 1]

n = input()
X = []

for i in range(n):
    X.append(map(int, raw_input().split()))

matrix(X)
Buggy python submission (verdict: Runtime Error):
N     = 100

M     = [[0 for i in range(N)] for j in range(N)]
color = [0 for i in range(N)]
d     = [0 for i in range(N)]
f     = [0 for i in range(N)]
tt    = 0

###
def dfs_visit(u):
    color[u] = 1
    tt = tt + 1
    d[u] = tt

    for v in range(n):
        if M[u][v] == 0:
            continue
        if color[v] == 0:
            dfs_visit(v)
    color[u] = 2
    tt = tt + 1
    f[u] = tt

###
def dfs():
    for u in range(n):
        color[u] = 0
    tt = 0

    for u in range(n):
        if color[u] == 0:
            dfs_visit(u)

    for u in range(n):
        print "%d %d %d" %(u + 1, d[u], f[u])

### MAIN
n = input()

for i in range(n):
    for j in range(n):
        M[i][j] = 0

for i in range(n):
    Num = map(int, raw_input().split())
    u = Num[0]
    k = Num[1]
    u = u - 1
    for j in range(k):
        v = Num[j]
        v = v - 1
        M[u][v] = 1

dfs()

Fixed submission:
n = input()

d     = [0 for i in range(n)]
f     = [0 for i in range(n)]
G     = [0 for i in range(n)]
M     = [[0 for i in range(n)] for j in range(n)]
color = [0 for i in range(n)]
tt    = [0]
WHITE = 0
GRAY  = 1
BLACK = 2

def dfs_visit(u):
    color[u] = GRAY
    tt[0] = tt[0] + 1
    d[u] = tt[0]
    for v in range(n):
        if M[u][v] == 0:
            continue
        if color[v] == WHITE:
            dfs_visit(v)
    color[u] == BLACK
    tt[0] = tt[0] + 1
    f[u] = tt[0]

def dfs():
    for u in range(n):
        if color[u] == WHITE:
            dfs_visit(u)
    for u in range(n):
        print "%d %d %d" %(u + 1, d[u], f[u])

### MAIN
for i in range(n):
    G = map(int, raw_input().split())
    for j in range(G[1]):
        M[G[0]-1][G[2+j]-1] = 1

dfs()
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
A = []
p = range(1, n)
a = [[0 for i in range(n)]for j in range(n)]

for i in range(n):
    a[i] = map(int, raw_input().split() )

l = 0

while p != []:
    a_min = 10000
    for i in A:
        for j in p:
            if 0 <= a[i][j] < a_min:
                a_min = a[i][j]
                add_A = j
    A.append(add_A)
    p.remove(add_A)
    l += a_min

print l

Fixed submission:
n = input()
A = [0]
p = range(1, n)
a = [[0 for i in range(n)]for j in range(n)]

for i in range(n):
    a[i] = map(int, raw_input().split() )

l = 0

while p != []:
    a_min = 10000
    for i in A:
        for j in p:
            if 0 <= a[i][j] < a_min:
                a_min = a[i][j]
                add_A = j
    A.append(add_A)
    p.remove(add_A)
    l += a_min

print l
Buggy python submission (verdict: Runtime Error):
num = input()
max = 1 - 1000000000
for i in range (len (num)):
    for j in range (len (num)):
        if (max > (num[i] - num[j])):
            max = num[i] - num[j]
print max

Fixed submission:
n = input()
R = [0 for i in range(n)]
for i in range(n):
    R[i] = input()
maxv = -2000000000
minv = R[0]

for j in range(1, n):
    maxv = max(maxv, R[j] - minv)
    minv = min(minv, R[j])

print maxv

Buggy python submission (verdict: Runtime Error):
num = raw_input()
max = 1 - 1000000000
for i in range (len (num)):
    for j in range (len (num)):
        if (max > (num[i] - num[j])):
            max = num[i] - num[j]
print max

Fixed submission:
n = input()
R = [0 for i in range(n)]
for i in range(n):
    R[i] = input()
maxv = -2000000000
minv = R[0]

for j in range(1, n):
    maxv = max(maxv, R[j] - minv)
    minv = min(minv, R[j])

print maxv

Buggy python submission (verdict: Runtime Error):
num = raw_input()
max = 1 - 1000000000
n   = len(input)

for i in range (n - 1):
    for j in range (i + 1, n):
        if (max > (num[i] - num[j])):
            max = num[i] - num[j]

print max

Fixed submission:
n = input()
R = [0 for i in range(n)]
for i in range(n):
    R[i] = input()
maxv = -2000000000
minv = R[0]

for j in range(1, n):
    maxv = max(maxv, R[j] - minv)
    minv = min(minv, R[j])

print maxv

Buggy python submission (verdict: Runtime Error):
num      = raw_input()
max      = 1 - 1000000000
length   = len(num)

for i in range (length):
    for j in range (i + 1, n):
        if (max > (num[i] - num[j])):
            max = num[i] - num[j]

print max

Fixed submission:
n = input()
R = [0 for i in range(n)]
for i in range(n):
    R[i] = input()
maxv = -2000000000
minv = R[0]

for j in range(1, n):
    maxv = max(maxv, R[j] - minv)
    minv = min(minv, R[j])

print maxv
Buggy python submission (verdict: Runtime Error):
n = input()
S = map(int, raw_input().split())
q = input()
T = map(int, raw_input().split())

count = 0

for i in range(n):
    Search = T[i]
    for j in range(q):
        if S[j] == Search:
            count = count + 1
            break

print count

Fixed submission:
n = input()
S = map(int, raw_input().split())
q = input()
T = map(int, raw_input().split())

count = 0

for i in range(q):
    Search = T[i]
    for j in range(n):
        if S[j] == Search:
            count = count + 1
            break

print count
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
S = map(int, raw_input().split())
q = input()
T = map(int, raw_input().split())

count   = 0
isExist = False
low     = 0
high    = n - 1
middle  = 0

for j in range(q):
    search = T[j]
    while True:
        middle = (high + low)/2
        print middle
        if S[middle] == search:
            count = count + 1
            break
        elif middle == 0:
            break
        elif search < S[middle]:
            high = middle - 1
        elif S[middle] < search:
            low = middle + 1

print count

Fixed submission:
def binarySearch(n, S, search):
    low    = 1 - 1
    high   = n - 1
    middle = 0

    while low < high:
        middle = (high + low)/2
        if S[middle] == search or S[low] == search or S[high] == search:
            return 1
        elif search < S[middle]:
            high = middle - 1
        elif S[middle] < search:
            low = middle + 1
    return 0

n = input()
S = map(int, raw_input().split())
q = input()
T = map(int, raw_input().split())

count = 0

for j in range(q):
    search = T[j]
    count = count + binarySearch(n, S, search)

print count
Buggy python submission (verdict: Runtime Error):
import math

def kock(n, x1, y1, x1, y2):
    if n == 0:
        return

    angle = math.radians(60)

    sx = (2*x1 + x2)/3
    sy = (2*y1 + y2)/3
    tx = (2*x2 + x1)/3
    ty = (2*y2 + y1)/3
    ux = (tx - sx)*math.cos(angle) - (ty - sy)*math.sin(angle) + sx
    uy = (tx - sx)*math.sin(angle) + (ty - sy)*math.cos(angle) + sy

    kock(n-1, x1, y1, sx, sy)
    print sx, sy
    kock(n-1, sx, sy, ux, uy)
    print ux, uy
    kock(n-1, ux, uy, tx, ty)
    print tx, ty
    kock(n-1, tx, ty, x2, y2)

n = input()

p1x = 0.
p1y = 0.
p2x = 100.
p2y = 0.

print p1x, p1y
kock(n, p1x, p1y, p2x, p2y)
print p2x, p2y

Fixed submission:
import math

def kock(n, x1, y1, x2, y2):
    if n == 0:
        return

    angle = math.radians(60)

    sx = (2*x1 + x2)/3
    sy = (2*y1 + y2)/3
    tx = (2*x2 + x1)/3
    ty = (2*y2 + y1)/3
    ux = (tx - sx)*math.cos(angle) - (ty - sy)*math.sin(angle) + sx
    uy = (tx - sx)*math.sin(angle) + (ty - sy)*math.cos(angle) + sy

    kock(n-1, x1, y1, sx, sy)
    print sx, sy
    kock(n-1, sx, sy, ux, uy)
    print ux, uy
    kock(n-1, ux, uy, tx, ty)
    print tx, ty
    kock(n-1, tx, ty, x2, y2)

n = input()

p1x = 0.
p1y = 0.
p2x = 100.
p2y = 0.

print p1x, p1y
kock(n, p1x, p1y, p2x, p2y)
print p2x, p2y

Buggy python submission (verdict: Runtime Error):
import math

def kock(n, x1, y1, x1, y2):
    if n == 0:
        return

    angle = math.radians(60)

    sx = (2*x1 + x2)/3
    sy = (2*y1 + y2)/3
    tx = (2*x2 + x1)/3
    ty = (2*y2 + y1)/3
    ux = (tx - sx)*math.cos(angle) - (ty - sy)*math.sin(angle) + sx
    uy = (tx - sx)*math.sin(angle) + (ty - sy)*math.cos(angle) + sy

    kock(n-1, x1, y1, sx, sy)
    print sx, sy
    kock(n-1, sx, sy, ux, uy)
    print ux, uy
    kock(n-1, ux, uy, tx, ty)
    print tx, ty
    kock(n-1, tx, ty, x2, y2)

n = input()

p1x = 0.
p1y = 0.
p2x = 100.
p2y = 0.

print p1x, p1y
kock(n, p1x, p1y, p2x, p2y)
print p2x, p2y

Fixed submission:
import math

def kock(n, x1, y1, x2, y2):
    if n == 0:
        return

    angle = math.radians(60)

    sx = (2*x1 + x2)/3
    sy = (2*y1 + y2)/3
    tx = (2*x2 + x1)/3
    ty = (2*y2 + y1)/3
    ux = (tx - sx)*math.cos(angle) - (ty - sy)*math.sin(angle) + sx
    uy = (tx - sx)*math.sin(angle) + (ty - sy)*math.cos(angle) + sy

    kock(n-1, x1, y1, sx, sy)
    print sx, sy
    kock(n-1, sx, sy, ux, uy)
    print ux, uy
    kock(n-1, ux, uy, tx, ty)
    print tx, ty
    kock(n-1, tx, ty, x2, y2)

n = input()

p1x = 0.
p1y = 0.
p2x = 100.
p2y = 0.

print p1x, p1y
kock(n, p1x, p1y, p2x, p2y)
print p2x, p2y
Buggy python submission (verdict: Runtime Error):
input_num = raw_input()

print num^3

Fixed submission:
num = input()

print num**3

Buggy python submission (verdict: Runtime Error):
input_num = raw_input()

print input_num**3

Fixed submission:
num = input()

print num**3
Buggy python submission (verdict: Runtime Error):
num = split().input()

print num[1] * num[2]

Fixed submission:
num = map(int, raw_input().split())

print num[0] * num[1], 2*num[0] + 2*num[1]

Buggy python submission (verdict: Runtime Error):
num = split().raw_input()

print num[1] * num[2]

Fixed submission:
num = map(int, raw_input().split())

print num[0] * num[1], 2*num[0] + 2*num[1]

Buggy python submission (verdict: Runtime Error):
num = raw_input().split()

print num[1] * num[2]

Fixed submission:
num = map(int, raw_input().split())

print num[0] * num[1], 2*num[0] + 2*num[1]

Buggy python submission (verdict: Runtime Error):
num = map(int, raw_input().split())

print num[1] * num[2]

Fixed submission:
num = map(int, raw_input().split())

print num[0] * num[1], 2*num[0] + 2*num[1]

Buggy python submission (verdict: Runtime Error):
num = map(int, raw_input().split())

print num[0] * num[1] 2*num[0] + 2*num[1] 

Fixed submission:
num = map(int, raw_input().split())

print num[0] * num[1], 2*num[0] + 2*num[1]
Buggy python submission (verdict: Runtime Error):
time = input()
h = time/3600
m = time%60/60
s = time%60
print h:m:s

Fixed submission:
time = input()
h = time/3600
m = time/60%60
s = time%60
print "%d:%d:%d"% (h, m, s)
Buggy python submission (verdict: Runtime Error):
num = input().split()

if (num[0] == num[1]):
    print "a == b"
if (num[0] <  num[1]):
    print "a < b"
if (num[0] >  num[1]):
    print "a > b"

Fixed submission:
a, b = map(int, raw_input().split())

if (a == b):
    print "a == b"
if (a >  b):
    print "a > b"
if (a <  b):
    print "a < b"
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

if a < b and b < c:
    print "Yes"
else:
    print "No" 

Fixed submission:
a, b, c = raw_input().split()

if (a < b < c):
    print "Yes"
else:
    print "No"

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

if (a < b and b < c):
    print "Yes"
else:
    print "No" 

Fixed submission:
a, b, c = raw_input().split()

if (a < b < c):
    print "Yes"
else:
    print "No"
Buggy python submission (verdict: Runtime Error):
Adr = [[[0 for r in range(10)]for f in range(3)]for b in range(4)]

n = input()

for i in range(n):
    Inf = map(int, raw_input().split())

    Adr[Inf[2]-1][Inf[1]-1][Inf[0]-1] += Inf[0]

for b in range(4):
    for f in range(3):
        print "",
        for r in range(10):
            print Adr[b][f][r],
        print ""

    if b < 3:
        print "####################"

Fixed submission:
Adr = [[[0 for r in range(10)]for f in range(3)]for b in range(4)]

n = input()

for i in range(n):
    Inf = map(int, raw_input().split())

    Adr[Inf[0]-1][Inf[1]-1][Inf[2]-1] += Inf[3]

for b in range(4):
    for f in range(3):
        print "",
        for r in range(10):
            if r != 9:
                print Adr[b][f][r],
            if r == 9:
                if f == 3:
                    print Adr[b][f][r],
                if f != 3:
                    print Adr[b][f][r]


    if b < 3:
        print "####################"

Buggy python submission (verdict: Runtime Error):
Adr = [[[0 for r in range(10)]for f in range(3)]for b in range(4)]

n = input()

for i in range(n):
    Inf = map(int, raw_input().split())

    Adr[Inf[2]-1][Inf[1]-1][Inf[0]-1] += Inf[0]

for b in range(4):
    for f in range(3):
        print "",
        for r in range(10):
            print Adr[b][f][r],
        print ""

    if b < 3:
        print "####################"

Fixed submission:
Adr = [[[0 for r in range(10)]for f in range(3)]for b in range(4)]

n = input()

for i in range(n):
    Inf = map(int, raw_input().split())

    Adr[Inf[0]-1][Inf[1]-1][Inf[2]-1] += Inf[3]

for b in range(4):
    for f in range(3):
        print "",
        for r in range(10):
            if r != 9:
                print Adr[b][f][r],
            if r == 9:
                if f == 3:
                    print Adr[b][f][r],
                if f != 3:
                    print Adr[b][f][r]


    if b < 3:
        print "####################"
Buggy python submission (verdict: Runtime Error):
n = input()
A = map(int, raw_input().split())
m = input()

def solve(i,j):
  if m == 0:
    return 1
  if i >= n:
    return 0
  res = solve(i + 1, m) or solve(i + 1, m - A[i])
for k in range(n)
  if solve(0,m):
    print 'Yes'
  else:
    print 'No'

Fixed submission:
num_n = int(input())
n = map(int, raw_input().split())
num_m = int(input())
m = map(int, raw_input().split())
     
def solve(i, m):
   if m == 0:
      return True
   if i >= num_n or m > sum(n):
      return False
   res = solve(i + 1, m) or solve(i + 1,m - n[i])
   return res
      
for k in range(num_m):
   if solve(0, m[k]):
      print "yes"
   else:
      print "no"

Buggy python submission (verdict: Runtime Error):
n_n = int(input())
n = map(int, raw_input().split())
n_m= int(input())
m = map(int, raw_input().split())
     
def solve(i, m):
   if m == 0:
      return True
   if i >= n_n or m > sum(n):
      return False
   res = solve(i + 1, m) or solve(i + 1,m - n[i])
   return res
      
for k in range(m_m):
   if solve(0, m[k]):
      print "yes"
   else:
      print "no"

Fixed submission:
num_n = int(input())
n = map(int, raw_input().split())
num_m = int(input())
m = map(int, raw_input().split())
     
def solve(i, m):
   if m == 0:
      return True
   if i >= num_n or m > sum(n):
      return False
   res = solve(i + 1, m) or solve(i + 1,m - n[i])
   return res
      
for k in range(num_m):
   if solve(0, m[k]):
      print "yes"
   else:
      print "no"
Buggy python submission (verdict: Runtime Error):
print x ^ 3

Fixed submission:
x = input()
cube = x * x * x
print cube

Buggy python submission (verdict: Runtime Error):
return x * x * x

Fixed submission:
x = input()
cube = x * x * x
print cube

Buggy python submission (verdict: Runtime Error):
print (x * x * x)

Fixed submission:
x = input()
cube = x * x * x
print cube

Buggy python submission (verdict: Runtime Error):
print int(x * x * x)

Fixed submission:
x = input()
cube = x * x * x
print cube

Buggy python submission (verdict: Runtime Error):
volume = x * x * x
print int(volume)

Fixed submission:
x = input()
cube = x * x * x
print cube

Buggy python submission (verdict: Runtime Error):
volume = x * x * x
print volume

Fixed submission:
x = input()
cube = x * x * x
print cube

Buggy python submission (verdict: Runtime Error):
x = raw_input()
cube = x * x * x
print cube

Fixed submission:
x = input()
cube = x * x * x
print cube

Buggy python submission (verdict: Runtime Error):
input(x)
cube = x * x * x
print cube

Fixed submission:
x = input()
cube = x * x * x
print cube