Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math
while True:
    a, b = map(int,raw_input().split())
    print int(math.log10(a+b) + 1)

Fixed submission:
while True:
	try:
		a,b = map(int,raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
import math
while True:
    a, b = map(int,raw_input().split())
    print int(math.log10(a+b) + 1)

Fixed submission:
while True:
	try:
		a,b = map(int,raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
    import math
    a, b = map(int,raw_input().split())
    print int(math.log10(a+b) + 1)

Fixed submission:
while True:
	try:
		a,b = map(int,raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    a, b = map(int,raw_input().split())
    print int(math.log10(a+b)+1)

Fixed submission:
while True:
	try:
		a,b = map(int,raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	a,b = map(int,raw_input().split())
	print strlen(srt(a+b))

Fixed submission:
while True:
	try:
		a,b = map(int,raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	a,b = map(int,raw_input().split())
	print len(srt(a+b))

Fixed submission:
while True:
	try:
		a,b = map(int,raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	a,b = map(int,raw_input().split())
	print len(str(a+b))

Fixed submission:
while True:
	try:
		a,b = map(int,raw_input().split())
		print len(str(a+b))
	except EOFError:
		break
Buggy python submission (verdict: Runtime Error):
a = int,raw_input()
for i in range(0,a):
	x, y, z = map(int,raw_input().split())
	if(x > y > z or x > z > y and x*x == y*y + z*z):
		print 'YES'
	elif(y > x > z or y > z > x and y*y == x*x + z*z):
		print 'YES'
	elif(z > x > y or z > y > z and z*z == x*x + y*y):
		print 'YES'
	else:
		print 'NO'

Fixed submission:
n = int(raw_input())
for i in xrange(n):
	a = map(int,raw_input().split())
	a.sort()
	if a[0]**2 + a[1]**2 == a[2]**2:
		print 'YES'
	else:
		print'NO'
Buggy python submission (verdict: Runtime Error):
while True:
	a,b,e,d,e,f = map(float,raw_input().split())
	x = (e*c-b*f) / (e*a-b*d)
	y = (c*d-a*f) / (b*d-e*a)
	print '%d %d' % (x,y)

Fixed submission:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split())
		x = (e*c-b*f) / (e*a-b*d)
		y = (c*d-a*f) / (b*d-e*a)
		if x == -0.0:
			x = 0
		if y == -0.0:
			y = 0
		print '%.3f %.3f' % (x,y)
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	a,b,c,d,e,f = map(float,raw_input().split())
	x = (e*c-b*f) / (e*a-b*d)
	y = (c*d-a*f) / (b*d-e*a)
	print '%.3f %.3f' % (x,y)

Fixed submission:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split())
		x = (e*c-b*f) / (e*a-b*d)
		y = (c*d-a*f) / (b*d-e*a)
		if x == -0.0:
			x = 0
		if y == -0.0:
			y = 0
		print '%.3f %.3f' % (x,y)
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	a,b,c,d,e,f = map(float,raw_input().split())
	x = (e*c-b*f) / (e*a-b*d)
	y = (c*d-a*f) / (b*d-e*a)
	print '%.3f %.3f' % (x,y)

Fixed submission:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split())
		x = (e*c-b*f) / (e*a-b*d)
		y = (c*d-a*f) / (b*d-e*a)
		if x == -0.0:
			x = 0
		if y == -0.0:
			y = 0
		print '%.3f %.3f' % (x,y)
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split())
		x = (e*c-b*f) / (e*a-b*d)
		y = (c*d-a*f) / (b*d-e*a)
		if x == -0.0:
			x = 0
		if y == -0.0
			y = 0
		print '%.3f %.3f' % (x,y)
	except EOFError:
		break

Fixed submission:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split())
		x = (e*c-b*f) / (e*a-b*d)
		y = (c*d-a*f) / (b*d-e*a)
		if x == -0.0:
			x = 0
		if y == -0.0:
			y = 0
		print '%.3f %.3f' % (x,y)
	except EOFError:
		break
Buggy python submission (verdict: Runtime Error):
while True:
	ans = 0
	n = int(raw_input())
	for i in xrange(10):
		for j in xrange(10):
			for k in xrange(10):
				for l in xrange(10):
					if i+j+k+l == n:
						ans += 1
	print ans

Fixed submission:
while True:
	try:
		ans = 0
		n = int(raw_input())
		for i in xrange(10):
			for j in xrange(10):
				for k in xrange(10):
					for l in xrange(10):
						if i+j+k+l == n:
							ans += 1
		print ans
	except EOFError:
		break
Buggy python submission (verdict: Runtime Error):
IsPrimes = [True] * 1000002
IsPimes[0], IsPimes[1] = False, False

for i in range(2, 1001):
    if IsPrime[i]:
        for j in range(i*i, 1000001, i)
            IsPrime[j]= False

cnt = [0] * 1000001

for i in range(1000001):
    if IsPimes[i]:
        cnt[i] += 1

for i in range(1, 1000001):
    cnt[i] += cnt[i-1]

while True:
    try:
        n = int(raw_input())
        print cnt[n]

    except EOFError:
        break


Fixed submission:
era = [True]*1000001
for i in xrange(2,1000001):
        if era[i-2]:
                for j in xrange(i*2,1000001,i):
                        era[j-2]=False
while True:
        try:
                n = int(raw_input())
                print era[:n-1].count(True)
        except EOFError:
                break

Buggy python submission (verdict: Time Limit Exceeded):
while True:
        try:
                n = int(raw_input())
                era=[True]*(n)
                for i in xrange(2,n):
                        if(era[i-1]):
                                for j in xrange(i*i-1,n,i):
                                        era[j]=False
                print era[1:n].count(True)
        except EOFError:
                break

Fixed submission:
era = [True]*1000001
for i in xrange(2,1000001):
        if era[i-2]:
                for j in xrange(i*2,1000001,i):
                        era[j-2]=False
while True:
        try:
                n = int(raw_input())
                print era[:n-1].count(True)
        except EOFError:
                break
Buggy python submission (verdict: Runtime Error):
import math

n = int(raw_input())

for i in range(n):

  x1, y1, x2, y2, x3, y3 = map(int, raw_input().split())

  px = ((y2 - y3)*(x1*x1 + y1*y1) + (y3 - y1)*(x2*x2 + y2*y2) + (y1 - y2)*(x3*x3 + y3*y3))/(2*(x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2)))
  py = ((x2 - x3)*(x1*x1 + y1*y1) + (x3 - x1)*(x2*x2 + y2*y2) + (x1 - x2)*(x3*x3 + y3*y3))/(2*(y1*(x2 - x3) + y2*(x3 - x1) + y3*(x1 - x2)))

  r = math.sqrt(pow((x1 - px), 2) + pow((y1 - py), 2))

  print "%.4f %.4f %.4f" % (px, py, r)

Fixed submission:
import math

n = int(raw_input())

for i in range(n):

  x1, y1, x2, y2, x3, y3 = map(float, raw_input().split())

  px = ((y2 - y3)*(x1*x1 + y1*y1) + (y3 - y1)*(x2*x2 + y2*y2) + (y1 - y2)*(x3*x3 + y3*y3))/(2*(x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2)))
  py = ((x2 - x3)*(x1*x1 + y1*y1) + (x3 - x1)*(x2*x2 + y2*y2) + (x1 - x2)*(x3*x3 + y3*y3))/(2*(y1*(x2 - x3) + y2*(x3 - x1) + y3*(x1 - x2)))

  r = math.sqrt(pow((x1 - px), 2) + pow((y1 - py), 2))

  print "%.3f %.3f %.3f" % (px, py, r)

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

n = int(raw_input())

for i in range(n):

  x1, y1, x2, y2, x3, y3 = map(int, raw_input().split())

  px = ((y2 - y3)*(x1*x1 + y1*y1) + (y3 - y1)*(x2*x2 + y2*y2) + (y1 - y2)*(x3*x3 + y3*y3))/(2*(x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2)))
  py = ((x2 - x3)*(x1*x1 + y1*y1) + (x3 - x1)*(x2*x2 + y2*y2) + (x1 - x2)*(x3*x3 + y3*y3))/(2*(y1*(x2 - x3) + y2*(x3 - x1) + y3*(x1 - x2)))

  r = math.sqrt(pow((x1 - px), 2) + pow((y1 - py), 2))

  print "%.3f %.3f %.3f" % (px, py, r)

Fixed submission:
import math

n = int(raw_input())

for i in range(n):

  x1, y1, x2, y2, x3, y3 = map(float, raw_input().split())

  px = ((y2 - y3)*(x1*x1 + y1*y1) + (y3 - y1)*(x2*x2 + y2*y2) + (y1 - y2)*(x3*x3 + y3*y3))/(2*(x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2)))
  py = ((x2 - x3)*(x1*x1 + y1*y1) + (x3 - x1)*(x2*x2 + y2*y2) + (x1 - x2)*(x3*x3 + y3*y3))/(2*(y1*(x2 - x3) + y2*(x3 - x1) + y3*(x1 - x2)))

  r = math.sqrt(pow((x1 - px), 2) + pow((y1 - py), 2))

  print "%.3f %.3f %.3f" % (px, py, r)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python2
# coding: utf-8

def casar(s, n):
  d = {}
  for c in (65, 97):
    for i in range(26):
      d[chr(i+c)] = chr((i+n) % 26 + c)

  return "".join([d.get(c, c) for c in s])
  

try:
  while True:
    encrypttxt = raw_input()
    for i in range(26):
      t = casar(encrypttxt, i)
      if  "the" in t or "this" in t or "that" in t:
        print t

except EOFError:
  break

Fixed submission:
#!/usr/bin/env python2
# coding: utf-8

def caesar(s, n):
    d = {}
    for c in (65, 97):
        for i in range(26):
            d[chr(i+c)] = chr((i+n) % 26 + c)

    return "".join([d.get(c, c) for c in s])


while True:
    try:
        encrypt_txt = raw_input()
    except EOFError:
        break

    for i in range(26):
        t = caesar(encrypt_txt, i)
        if  "the" in t or "this" in t or "that" in t:
            print t
            break
Buggy python submission (verdict: Runtime Error):
while True:

  a = map(int, raw_input().split())
  b = map(int, raw_input().split())

  hit = 0
  blow = 0

  for i in range(4):

    if(a[i] == b[i]):
      hit += 1

    elif(a[i] in b):
      blow += 1

  print hit, blow

Fixed submission:
while True:

  try:

    a = map(int, raw_input().split())
    b = map(int, raw_input().split())

    hit = blow = 0

    for i in range(4):

      if(a[i] == b[i]):
        hit += 1

      elif(a[i] in b):
        blow += 1

    print hit, blow

  except EOFError:
    break

Buggy python submission (verdict: Runtime Error):
while True:

  a = map(int, raw_input().split(' '))
  b = map(int, raw_input().split(' '))

  hit = blow = 0

  for i in range(4):

    if(a[i] == b[i]):
      hit += 1

    elif(a[i] in b):
      blow += 1

  print hit, blow

Fixed submission:
while True:

  try:

    a = map(int, raw_input().split())
    b = map(int, raw_input().split())

    hit = blow = 0

    for i in range(4):

      if(a[i] == b[i]):
        hit += 1

      elif(a[i] in b):
        blow += 1

    print hit, blow

  except EOFError:
    break

Buggy python submission (verdict: Runtime Error):
while True:
  try:
    a = map(int, raw_input().split(' '))
    b = map(int, raw_input().split(' '))

    hit = blow = 0

    for i in range(4):

      if(a[i] == b[i]):
        hit += 1

      elif(a[i] in b):
        blow += 1

    print hit, blow

  except EOFError:
    break

Fixed submission:
while True:

  try:

    a = map(int, raw_input().split())
    b = map(int, raw_input().split())

    hit = blow = 0

    for i in range(4):

      if(a[i] == b[i]):
        hit += 1

      elif(a[i] in b):
        blow += 1

    print hit, blow

  except EOFError:
    break
Buggy python submission (verdict: Runtime Error):
def bubble_sort(A, N):
    flag = True
    c = 0
    i = 0
    while flag:
        flag = False
        for j in range(N-1, i, -1):
            if A[j] < A[j-1]:
                A[j],  A[j-1] = A[j-1], A[j]
                c += 1
                flag = True
        i += 1

    return c


while True:

    N = int(raw_input())

    if N == 0:
        break
    
    A = [map(int, raw_input()) _ for i in range(N)]

    print bubble_sort(A, N)

Fixed submission:
def bubble_sort(A, N):
    flag = True
    i, c = 0, 0
    while flag:
        flag = False
        for j in range(1, N-i):
              if A[j] < A[j-1]:
                  A[j],  A[j-1] = A[j-1], A[j]
                  flag = True
                  c += 1
        i += 1

    return c


while True:

    N = int(raw_input())

    if N == 0:
        break

    A = [int(raw_input()) for _ in xrange(N)]

    print bubble_sort(A, N)
Buggy python submission (verdict: Runtime Error):
while True:
    N, Q = map(int, raw_input().split())

    if N == 0 and Q == 0:
        break

    t = [map(int, raw_input().split())[1:] for _ in range(N)]
    table = [[i, 0] for i in range(10)]

    for i in t:
        for j in i:
            table[j][1] += 1

    table.sort(reverse=True, key=lambda x: x[1])

    print table[0][0] if table[0][1] >= Q else 0



Fixed submission:
while True:
    N, Q = map(int, raw_input().split())

    if N == 0 and Q == 0:
        break

    t = [map(int, raw_input().split())[1:] for _ in range(N)]
    table = [[i, 0] for i in range(101)]

    for i in t:
        for j in i:
            table[j][1] += 1

    table.sort(reverse=True, key=lambda x: x[1])

    print table[0][0] if table[0][1] >= Q else 0
Buggy python submission (verdict: Runtime Error):
while True:

  n = int(raw_input())

  if n == 0:
    break

  l = []

  for i in range(n):
    l.append(int(raw_input())

  print (sum(l) - max(l) - min(l)) / (len(l) - 2)

Fixed submission:
while True:
    n = int(raw_input())

    if n == 0:
        break

    L = [int(raw_input()) for _ in range(n)]

    print (sum(L) - max(L) - min(L)) / (n - 2)

Buggy python submission (verdict: Runtime Error):
while True:
    n = int(raw_input())

    if !n:
        break

    L = [int(raw_input()) for _ in range(n)]

    print (sum(L) - max(L) - min(L)) / (n - 2)



Fixed submission:
while True:
    n = int(raw_input())

    if n == 0:
        break

    L = [int(raw_input()) for _ in range(n)]

    print (sum(L) - max(L) - min(L)) / (n - 2)
Buggy python submission (verdict: Runtime Error):
while True:
    x, y, s = map(int, raw_input().split())

    if x == 0 and y == 0 and s == 0:
        break

    ans = 0

    for i in range(1, s):
        for j in range(1, s):
            a = i * (100 + x) / 100;
            b = j * (100 + x) / 100;

            if a + b != s:
                continue

            ans = max(ans, i * (100 + y) / 100 + j * (100 + y) / 100)

    print ans



Fixed submission:
while True:
    x, y, s = map(int, raw_input().split())

    if x == 0 and y == 0 and s == 0:
        break

    ans = 0

    for i in range(1, s):
        for j in range(1, s-i+1):
            if int(i * (100 + x) / 100.0) + int(j * (100 + x) / 100.0) == s:
                ans = max(ans, int(i * (100 + y) / 100.0) + int(j * (100 + y) / 100.0))

    print ans
Buggy python submission (verdict: Runtime Error):
while True:
    n, m = map(int, raw_input().split())

    if n == 0 and m == 0:
        break

    a = [int(raw_input()) for _ in range(n)]

    ans = -1

    for i in range(n-1):
        for j in range(i+1, n):
            if a[i] + a[j] <= m:
                ans = max(ans, a[i] + a[j])

    print "NONE" if ans == -1 else ans


Fixed submission:
while True:
    n, m = map(int, raw_input().split())

    if n == 0 and m == 0:
        break

    a = map(int, raw_input().split())

    ans = -1

    for i in range(n-1):
        for j in range(i+1, n):
            if a[i] + a[j] <= m:
                ans = max(ans, a[i] + a[j])

    print "NONE" if ans == -1 else ans
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())

dp = [1, 1]

for i in range(50):
    dp += dp[-1] + dp[-2]

print dp[n]



Fixed submission:
n = int(raw_input())

dp = [1, 1]

for i in range(50):
    dp += [dp[-1] + dp[-2]]

print dp[n]
Buggy python submission (verdict: Runtime Error):
def bubbleSort(A, N):
    c = 0
    flag = 1   # ????????£??\????´?????????¨??????
    while flag:
        flag = 0
        for j in range(N-1, 0, -1):
            if A[j] < A[j-1]:
                A[j], A[j-1] = A[j-1], A[j]
                c += 1
                flag = 1
    print " ".join(map(str, A))
    print c


N = int(raw_input())
L = map(int, raw_input().split())

bubbleSort(L, N)

Fixed submission:
def bubble_sort(A, N):
    flag = True
    i, c = 0, 0
    while flag:
        flag = False
        for j in range(1, N-i):
              if A[j] < A[j-1]:
                  A[j],  A[j-1] = A[j-1], A[j]
                  flag = True
                  c += 1
        i += 1
    
    print " ".join(map(str, A))
    print c


N = int(raw_input())
A = map(int, raw_input().split())
 
bubble_sort(A, N)

Buggy python submission (verdict: Time Limit Exceeded):
def bubble_sort(A, N):
    flag = True
    c = 0
    i = 0
    while flag:
        for j in range(N-1, i, -1):
            flag = False
            if A[j] < A[j-1]:
                A[j],  A[j-1] = A[j-1], A[j]
                c += 1
                flag = True
        i += 1

    print " ".join(map(str, A))
    print c


N = int(raw_input())
A = map(int, raw_input().split())

bubble_sort(A, N)

Fixed submission:
def bubble_sort(A, N):
    flag = True
    i, c = 0, 0
    while flag:
        flag = False
        for j in range(1, N-i):
              if A[j] < A[j-1]:
                  A[j],  A[j-1] = A[j-1], A[j]
                  flag = True
                  c += 1
        i += 1
    
    print " ".join(map(str, A))
    print c


N = int(raw_input())
A = map(int, raw_input().split())
 
bubble_sort(A, N)
Buggy python submission (verdict: Runtime Error):
s = raw_input()

St1, St2 = [], []
sumv = 0

for i in range(len(s)):
    if s[i] == '\\':
        St1.append(i)
    elif s[i] == '/' and len(St1) > 0:
        j = St1.pop()
        a = i-j
        sumv += a
        while len(St2) > 0 and St2[-1][0] > j:
            a += St2.pop()[1]

        St2.append([j, a])

St2.insert(0, len(St2))

print sumv
print ' '.join(map(lambda x: str(x[1]), St2))

Fixed submission:
s = raw_input()

St1, St2 = [], []
sumv = 0

for i in range(len(s)):
    if s[i] == '\\':
        St1.append(i)
    elif s[i] == '/' and len(St1) > 0:
        j = St1.pop()
        a = i-j
        sumv += a
        while len(St2) > 0 and St2[-1][0] > j:
            a += St2.pop()[1]

        St2.append([j, a])

St2.insert(0, [0, len(St2)])

print sumv
print ' '.join(map(lambda x: str(x[1]), St2))
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
S = map(int, raw_input(),split())

q = int(raw_input())
T = map(int, raw_input().split())

ans = 0

for i in T:
    if i in S:
        ans += 1

print ans

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

q = int(raw_input())
T = map(int, raw_input().split())

ans = 0

for i in T:
    if i in S:
        ans += 1

print ans
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
L = []

for i in xrange(n):
    a, b = map(raw_input().split())
    if a == "insert":
        L.append(b)
    if a == "find":
        if b in L:
            print "yes"
        else:
            print "no"

Fixed submission:
n = int(raw_input())
dic = {}

for i in xrange(n):
    a, b = raw_input().split()
    if a == "insert":
        dic[b] = True
    elif a == "find":
        if b in dic:
            print "yes"
        else:
            print "no"

Buggy python submission (verdict: Time Limit Exceeded):
n = int(raw_input())
L = []

for i in xrange(n):
    a, b = raw_input().split()
    if a == "insert":
        L.append(b)
    if a == "find":
        if b in L:
            print "yes"
        else:
            print "no"

Fixed submission:
n = int(raw_input())
dic = {}

for i in xrange(n):
    a, b = raw_input().split()
    if a == "insert":
        dic[b] = True
    elif a == "find":
        if b in dic:
            print "yes"
        else:
            print "no"
Buggy python submission (verdict: Time Limit Exceeded):
def solve(i, m):
    if m == 0:
        return True
    if i == n or m < 0:
        return False

    res = solve(i + 1, m) or solve(i + 1, m - A[i])
    return res

n = int(raw_input())
A = map(int, raw_input().split())

q = int(raw_input())
M = map(int, raw_input().split())

for i in M:
    print "yes" if solve(0, i) else "no"

Fixed submission:
def solve(i, m):
    if m == 0: return True

    if i < n and min(A[i:]) <= m <= sum(A[i:]):
        r1 = solve(i + 1, m-A[i])
        if r1: return r1
        r2 = solve(i + 1, m)
        if r2: return r2


n = int(raw_input())
A = map(int, raw_input().split())

q = int(raw_input())
M = map(int, raw_input().split())

for i in M:
    print "yes" if solve(0, i) else "no"

Buggy python submission (verdict: Time Limit Exceeded):
def solve(i, m):
    if m == 0:
        return True
    if i == n or m < 0:
        return False

    res = solve(i + 1, m) or solve(i + 1, m - A[i])
    return res


n = int(raw_input())
A = map(int, raw_input().split())

q = int(raw_input())
M = map(int, raw_input().split())

for i in M:
    print "yes" if solve(0, i) else "no"

Fixed submission:
def solve(i, m):
    if m == 0: return True

    if i < n and min(A[i:]) <= m <= sum(A[i:]):
        r1 = solve(i + 1, m-A[i])
        if r1: return r1
        r2 = solve(i + 1, m)
        if r2: return r2


n = int(raw_input())
A = map(int, raw_input().split())

q = int(raw_input())
M = map(int, raw_input().split())

for i in M:
    print "yes" if solve(0, i) else "no"

Buggy python submission (verdict: Time Limit Exceeded):
def solve(i, m):
    if m == 0: return True
    if i == n or m < 0:
        return False

    r1 = solve(i + 1, m)
    r2 = solve(i + 1, m - A[i])

    return r1 or r2


n = int(raw_input())
A = map(int, raw_input().split())

q = int(raw_input())
M = map(int, raw_input().split())

for i in M:
    print "yes" if solve(0, i) else "no"

Fixed submission:
def solve(i, m):
    if m == 0: return True

    if i < n and min(A[i:]) <= m <= sum(A[i:]):
        r1 = solve(i + 1, m-A[i])
        if r1: return r1
        r2 = solve(i + 1, m)
        if r2: return r2


n = int(raw_input())
A = map(int, raw_input().split())

q = int(raw_input())
M = map(int, raw_input().split())

for i in M:
    print "yes" if solve(0, i) else "no"
Buggy python submission (verdict: Runtime Error):
def counting_sort(A, B, k):
    C = [0 for _ in xrange(k+1)]
    for a in A:
        C[a] += 1

    for i in xrange(k):
        C[i] = C[i] + C[i-1]

    for i in xrange(n-1, -1, -1):
        B[C[A[i]]-1] = A[i]
        C[A[i]] -= 1


n = int(raw_input())
A = map(int, raw_input().split())
B = [0 for _ in xrange(n)]

counting_sort(A, B, 10000)

print " ".join(map(str, B)

Fixed submission:
def counting_sort(A, B, k):
    C = [0 for _ in xrange(k+1)]
    for a in A:
        C[a] += 1

    for i in xrange(1, k+1):
        C[i] = C[i] + C[i-1]

    for i in xrange(n-1, -1, -1):
        B[C[A[i]]-1] = A[i]
        C[A[i]] -= 1


n = int(raw_input())
A = map(int, raw_input().split())
B = [0 for _ in xrange(n)]

counting_sort(A, B, 10000)

print " ".join(map(str, B))
Buggy python submission (verdict: Runtime Error):
a = map(int,raw_input().split())
print a**3

Fixed submission:
a = input()
print a**3
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,raw_input().split())
if a > b > c:
    print a b c
elif a > c > b:
    print a c b
elif b > a > c:
    print b a c
elif b > c > a:
    print b c a
elif c > a > b:
    print c a b
else:
    print c b a

Fixed submission:
a = map(int,raw_input().split())
a.sort()
for i in xrange(3):
          print a[i],

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,raw_input().split())
if a < b:
    a = tmp
    a = b
    b =tmp
elif b < c:
    b = tmp
    b = c
    c =tmp
elif a < c:
    a = tmp
    a = c
    c = tmp
print a b c

Fixed submission:
a = map(int,raw_input().split())
a.sort()
for i in xrange(3):
          print a[i],
Buggy python submission (verdict: Runtime Error):
import math
r = float(raw_input())
print ("%f %f"%(r**2*PI,r*2*PI))

Fixed submission:
import math
r = float(raw_input())
print '%f %f' % (r*r*math.pi,r*2*math.pi)
Buggy python submission (verdict: Runtime Error):
import sys
 x = input()
 y = input()
print x*y , (x+y)*2

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

Buggy python submission (verdict: Runtime Error):
import sys
x = input()
y = input()
print x*y ,(x+y)*2

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

Buggy python submission (verdict: Runtime Error):
x = raw_input()
y = raw_input()

print int(x) * int(y)
print (int(x) + int(y))*2

Fixed submission:
a, b = map(int,raw_input().split())
print a*b, 2*(a+b)
Buggy python submission (verdict: Runtime Error):
a, b = map(int,raw_inpu().split())
if a < b:
	print 'a < b'
elif a > b:
	print 'a > b'
else:
	print 'a == b'

Fixed submission:
a, b = map(int,raw_input().split())
if a < b:
	print 'a < b'
elif a > b:
	print 'a > b'
else:
	print 'a == b'