Harryxun/stf_run huggingface dataset:
mport numpy as np
import math

H = input()
H_bar=int(H)
counter=0
bunki=0

while H_bar!=1:
 H_bar=math.floor(H_bar/2)
 bunki=bunki+2**counter
 counter=counter+1
  
Sum=bunki+2**counter
print(Sum)

### FIXED CODE ###

import numpy as np
import math

H = input()
H_bar=int(H)
counter=0
bunki=0

while H_bar!=1:
 H_bar=math.floor(H_bar/2)
 bunki=bunki+2**counter
 counter=counter+1
  
Sum=bunki+2**counter
print(Sum)
A, B, C, D = [int(x) for x in input().split()]

def main();
    ans = A + B - C - D
    if ans > 0:
        print('Left')
    elif ans < 0:
        print('Right')
    else:
        print('Balanced')

if __name == '__main__':
    main()

### FIXED CODE ###

A, B, C, D = [int(x) for x in input().split()]

def main():
    ans = A + B - C - D
    if ans > 0:
        print('Left')
    elif ans < 0:
        print('Right')
    else:
        print('Balanced')

if __name__ == '__main__':
    main()
N = int(input())
A = list(map(int, input().split()))

import sys
from collections import Counter
d = Counter(A)

if d[0] == N:
    print("Yes")
    sys.exit()

if d[0] == N // 3:
    for x in d.keys():
        if d[x] == 2 * N // 3:
            print("Yes")
            sys.exit()

third = N // 3
if len(d.keys() == 3):
    a, b, c = d.keys()
    if d[a] == d[b] and d[b] == d[c]:
        if a ^ b ^ c == 0:
            print("Yes")
            sys.exit()

"""
# O(N^3)
third = N // 3
# print(third)
cand = list(filter(lambda x: d[x] == third, A))
# print(cand)
for ix1 in range(len(cand)):
    for ix2 in range(ix1 + 1, len(cand)):
        for ix3 in range(ix2 + 1, len(cand)):
            if cand[ix1] ^ cand[ix2] ^ cand[ix3] == 0:
                print("Yes")
                sys.exit()
"""
print("No")

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

import sys
from collections import Counter
d = Counter(A)

if d[0] == N:
    print("Yes")
    sys.exit()

if d[0] == N // 3:
    for x in d.keys():
        if d[x] == 2 * N // 3:
            print("Yes")
            sys.exit()

third = N // 3
if len(d.keys()) == 3:
    a, b, c = d.keys()
    if d[a] == d[b] and d[b] == d[c]:
        if a ^ b ^ c == 0:
            print("Yes")
            sys.exit()

print("No")
s=input()
s=s.trim()
if s=="rrs" or s=="srr":
    print("2")
elif s=="rrr":
    print("3")
elif s=="sss":
    print('0')
else:
    print('1')


### FIXED CODE ###

s = str(input())
s=s.lower()

if s=="rrr":
    print('3')
elif s.find('rr') != -1:
    print("2")
elif s.find('r') != -1:
    print("1")
else:
    print ("0")
H, K = map(int, input().split())
hp = list(map(input().split()))
hp.sort(reverse=True)
print(sum(hp[K:]))


### FIXED CODE ###

H, K = map(int, input().split())
hp = list(map(int, input().split()))
hp.sort(reverse=True)
print(sum(hp[K:]))
num = list(map(int,input().split()))
    a=0
    b=0
    for i in range(3):
    	if num[i]==5:
    		a+=1
    	if num[i]==7:
    		b+=1
    if a==2 and b==1:
    	print("YES")
    else:
    	print("NO")

### FIXED CODE ###

word = list(map(int,input().split()))
#print(word) ['5', '5', '7']
a=0
b=0
for i in range(3):
    if word[i]==int(5):
        a=a+1
for i in range(3):
    if word[i]==int(7):
        b=b+1
if a==2 and b==1:
	print("YES")
else:
  	print("NO")
a=input()
b=input()
c=0
if (len(a)+1)!=len(b):
  print("No")
else:
  for i in range(len(b)):
    if a[i]==b[i]:
      c=c+1
  if c==len(a):
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

a=input()
b=input()
c=0
if (len(a)+1)!=len(b):
  print("No")
else:
  for i in range(len(a)):
    if a[i]==b[i]:
      c=c+1
  if c==len(a):
    print("Yes")
  else:
    print("No")
s= input()
a=0
b=0
for i in range(len(s)):
  if s[i]=='C':
    a += i
  elif s[i]=='F':
    b += i
if a,b!=0 and a<b:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s= input()
a=-1
b=-1
for i in range(len(s)):
  if s[i]=='C':
    a = i
  elif s[i]=='F':
    b = i
if a>=0and a<b:
  print("Yes")
else:
  print("No")
class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0] * (n)

    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
        else:
            self.par[y] = x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

n,m=map(int,input().split())
U=UnionFind(n)

for i in range(m):
  x,y,z=map(int,input().split())
  U.union(x-1,y-1)
ans=0
for i,j in enamurate(U.par):
  if i==j:
    ans+=1
print(ans)


### FIXED CODE ###

class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0] * (n)

    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
        else:
            self.par[y] = x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

n,m=map(int,input().split())
U=UnionFind(n)

for i in range(m):
  x,y,z=map(int,input().split())
  U.union(x-1,y-1)
ans=0
for i,j in enumerate(U.par):
  if i==j:
    ans+=1
print(ans)
n,k=map(int,input().split())
s=input()
cnt=0
siten=s[0]
onezero=[]
for i in range(n-1):
    if s[i:i+2]=='01':
        cnt+=1
        onezero+=[cnt]
        cnt=0
        
    else:
        cnt+=1
        if n-2==i:
            cnt+=1
            onezero[-1]+=cnt

ans=[1]
for i in range(max(1,len(onezero)-k+1)):
    #print(onezero[i:i+k])
    if siten=='0':
        ans+=[sum(onezero[i:i+k+1])-1]
    else:
        ans+=[sum(onezero[i:i+k])]

print(max(ans))

### FIXED CODE ###

n,k=map(int,input().split())
s=input()
cnt=1
siten=s[0]
onezero=[0]
for i in range(n-1):
    if s[i]!=s[i+1]:
        onezero+=[cnt]
    cnt+=1

onezero+=[cnt]

x=len(onezero)

if siten=='1':
    onezero+=[onezero[-1]]*2
    t=int(x/2-1)
    if k>=t:
        print(n)
    else:
        ans=[0]
        for i in range(t-k+2):
            ans+=[onezero[2*(i+k)+1]-onezero[2*i]]
        print(max(ans))

else:
    onezero+=[onezero[-1]]
    t=int(x/2)
    if k>=t:
        print(n)
    else:
        ans=[onezero[2*k]]
        for i in range(t-k):
            ans+=[onezero[2*(i+k+1)]-onezero[2*i+1]]
        print(max(ans))
c = 0

for i in range(0,3):
  if S[i:i+1] == T[i:i+1]:
    c += 1
  
print(c)

### FIXED CODE ###

S = input()
T = input()
c = 0
for i in range(0,3):
  if S[i:i+1] == T[i:i+1]:
    c += 1
print(c)
a,b,c = input().split()
print(a,b,c)

### FIXED CODE ###

a,b,c = input().split(",")
print(a,b,c)
import sys
import math
import fractions
def input(): return sys.stdin.readline().rstrip()

def main():
    a, b, c, d = map(int, input().split())
    def count_ab(n):
        return math.floor(b / n) - math.ceil(a / n) + 1
    c_cnt = count_ab(c)
    d_cnt = count_ab(d)
    cd_cnt = count_ab(c * d // fractions.gcd(c, d))

    print(b - a - c_c - d_c + cd_c + 1)

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import fractions
def input(): return sys.stdin.readline().rstrip()

def main():
    a, b, c, d = map(int, input().split())
    cd_gcd = c * d // fractions.gcd(c, d)
    cnt = lambda n: n - n // c - n // d + n // cd_gcd
    print(cnt(b) - cnt(a-1))

if __name__ == '__main__':
    main()
A =int( input())
B =int( input())
C =int( input())
D = int(input())
E = int(input())

li = [A,B,C,D,E]
li_nonzero=[]

for x in li:
    if x % 10 != 0:
        li_nonzero.append(x)

z = li_nonzero[0]%10
for y in li_nonzero:
    if y % 10 <= z:
        z = y%10
        last_menu = y
        
li.remove(last_menu)
sum_time = 0
for menu in li:
    if menu % 10 != 0:
        sum_time = sum_time +( (menu//10)*10+10)
    else:
        sum_time = sum_time +( (menu//10)*10+0)
        
    
print(sum_time+last_menu)
    

### FIXED CODE ###

A =int( input())
B =int( input())
C =int( input())
D = int(input())
E = int(input())

li = [A,B,C,D,E]
li_nonzero=[]



for x in li:
    if x % 10 != 0:
        li_nonzero.append(x)

if len(li_nonzero) == 0:
    last_menu = li[4]
    li.remove(li[4])
else:
    z = li_nonzero[0]%10
    for y in li_nonzero:
        if y % 10 <= z:
            z = y%10
            last_menu = y
            
    li.remove(last_menu)

if len(li) < 4:
    while(len(li)==4):
        li.append(last_menu)
sum_time = 0
for menu in li:
    if menu % 10 != 0:
        sum_time = sum_time +( (menu//10)*10+10)
    else:
        sum_time = sum_time +( (menu//10)*10+0)
        
    
print(sum_time+last_menu)
N,K=map(int,input().split())

#kaijou
kk=[1]
a=1
for i in range(0,N-K+5):
  a=a*(i+1)
  kk.append(a)
#print(kk)
  
for i in range(0,K):
  j=i+1
  if N-K-j+1<0:
    print("0")
  else:
    aaa=int(kk[N-K+1]/(kk[N-K-j+1]*kk[j]))
    bbb=int(kk[K-1]/(kk[K-j]*kk[j-1]))
    #print(aaa,"aaa",bbb,"bbb")
    ccc=aaa*bbb
    print(ccc%(10**9+7))
  

### FIXED CODE ###

N,K=map(int,input().split())

#kaijou
kk=[1]
a=1
for i in range(0,N):
  a=a*(i+1)
  kk.append(a)
#print(kk)
  
for i in range(0,K):
  j=i+1
  if N-K-j+1<0:
    print("0")
  else:
    aaa=(kk[N-K+1]//(kk[N-K-j+1]*kk[j]))%(10**9+7)
    bbb=(kk[K-1]//(kk[K-j]*kk[j-1]))%(10**9+7)
    #print(j,aaa,"aaa",bbb,"bbb")
    ccc=aaa*bbb
    print(int(ccc%(10**9+7)))
n = int(input())
x = [0] * n
y = [0] * n
h = [0] * n
for i in range(n):
    x2, y2, h2 = map(int, input().split())
    x[i] = x2
    y[i] = y2
    h[i] = h2
ans = [0,0,0]
for i in range(101):
    for j in range(101):
        l = 0
        while h[l] == 0:
            l += 1
        #print(l)
        val = h[l] + abs(i-x[l]) + abs(j-y[l])
        flg = True
        for k in range(n):
            if val != h[k] + abs(i-x[k]) + abs(j-y[k]) and h[k] != 0:
                flg = False
            if h[k] == 0 and val != abs(i-x[k]) + abs(j-y[i]) and val - (i-x[k]) - (j-y[k]) == 0:
                flg == False
        if flg == True:
            ans = [i,j,val]
print(' '.join(map(str,ans)))


### FIXED CODE ###

n = int(input())
x = [0] * n
y = [0] * n
h = [0] * n
for i in range(n):
    x2, y2, h2 = map(int, input().split())
    x[i] = x2
    y[i] = y2
    h[i] = h2
ans = [0,0,0]
for i in range(101):
    for j in range(101):
        l = 0
        while h[l] == 0:
            l += 1
        #print(l)
        val = h[l] + abs(i-x[l]) + abs(j-y[l])
        flg = True
        for k in range(n):
            if val != h[k] + abs(i-x[k]) + abs(j-y[k]) and h[k] != 0:
                flg = False
            if h[k] == 0 and abs(i-x[k]) + abs(j-y[k]) < val:
                flg = False
        if flg == True:
            ans = [i,j,val]
print(' '.join(map(str,ans)))
N = int(input())

L = [0] * N

for i in range(N):
  A = int(input())
  #print(i)
  L[i] = [list(map(int, input().split()))]
  for j in range(1,A):
    L[i].append(list(map(int, input().split())))
    
#print(L)

ans = 0
for i in range(2**N):
  pat = str(format(i, '0' + str(N) + 'b'))
  flg = True
  #S = [-1] * (N)
  for j in range(N):
    if pat[j] == "1": # trueman
      for rule in L[j]:
        if pat[rule[0]-1] == "0" and rule[1] == 1:
          flg = False
          break
        if pat[rule[0]-1] == "1" and rule[1] == 0:
          flg = False
          break
  #print("XXX", flg, pat, j)
  if flg:
    work = 0
    for ch in pat:
      if ch == "1":
        work += 1
    #print("XXX", flg, pat, j, work)
    ans = max(ans, work)
    
print(ans)

### FIXED CODE ###

N = int(input())

L = [0] * N

for i in range(N):
  A = int(input())
  if A == 0:
    L[i] = []
  else:
    L[i] = [list(map(int, input().split()))]
  for j in range(1,A):
    L[i].append(list(map(int, input().split())))
    
#print(L)

ans = 0
for i in range(2**N):
  pat = str(format(i, '0' + str(N) + 'b'))
  flg = True
  #S = [-1] * (N)
  for j in range(N):
    if pat[j] == "1": # trueman
      for rule in L[j]:
        if pat[rule[0]-1] == "0" and rule[1] == 1:
          flg = False
          break
        if pat[rule[0]-1] == "1" and rule[1] == 0:
          flg = False
          break
  #print("XXX", flg, pat, j)
  if flg:
    work = 0
    for ch in pat:
      if ch == "1":
        work += 1
    #print("XXX", flg, pat, j, work)
    ans = max(ans, work)
    
print(ans)
A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 //初期値
           
#全件走査
maxA = X // 500 if 500 * A > X else A
for i in range(maxA + 1):
  maxB = (X - 500 * i ) // 100 if 100 *B > (X - 500 * i) else B
  for j in range(maxB + 1):
    q,mod = divmode (X - 500 * i - 100 * j ,50)
    if mod == 0 and q <= C:count += 1      
print(count)

### FIXED CODE ###

A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 #初期値
           
#全件走査
maxA = X // 500 if 500 * A > X else A
for i in range(maxA + 1):
  maxB = (X - 500 * i) // 100 if 100 * B > (X - 500 * i) else B
  for j in range(maxB + 1):
    q,mod = divmod (X - 500 * i - 100 * j ,50)
    if mod == 0 and q <= C:count += 1    
print(count)
A = input()

S = [SUN,MON,TUE,WED,THU,FRI,SAT]

for i in range(7):
  if A == S[i]:
    print(7-i)
    break
  i+=1


### FIXED CODE ###

A = input()

S = ['SUN','MON','TUE','WED','THU','FRI','SAT']

for i in range(7):
  if A == S[i]:
    print(7-i)
    break
  i+=1
num1, num2 = map(int, input().split())

import math
def factor(num):
  l = []
  a = math.ceil(math.sqrt(num))
  for i in range(2,a):
    if num%i==0:
      l.append(i)
  return l

l1 = factor(num1)
l2 = factor(num2)
l = set(l1,l2)

ans = 1
for _ in l:
  ans = ans * _
  
print(ans)
  

### FIXED CODE ###

num1, num2 = map(int, input().split())

import math
def gcd(num1, num2):
  for i in range(min(num1, num2),0,-1):
    if num1%i==0 and num2%i==0:
      return i
    
print(int(num1*num2/gcd(num1,num2)))
while True:
    w, h = map(int, raw_input().split())
    if w == 0 and h == 0:
        break
    tile = []
    for i in range(h):
        tile.append(list(raw_input()))
    print tile
    x = y = 0
    while True:
        a = tile[y][x]
        tile[y][x] = 0
        if   a == ">": x += 1
        elif a == "<": x -= 1
        elif a == "^": y -= 1
        elif a == "v": y += 1
        elif a == ".": print x,y; break
        else: print "LOOP"; break

### FIXED CODE ###

while True:
    h, w = map(int, raw_input().split())
    if w == 0 and h == 0:
        break
    tile = []
    for i in range(h):
        tile.append(list(raw_input()))
    x = y = 0
    while True:
        a = tile[y][x]
        tile[y][x] = 0
        if   a == ">": x += 1
        elif a == "<": x -= 1
        elif a == "^": y -= 1
        elif a == "v": y += 1
        elif a == ".": print x,y; break
        else: print "LOOP"; break
N,X = map(int, input().split())
L = list(map(int,input().split()))
d = 0
cnt = 1
for i in range(N+1):
    d = d + L[i]
    if d>X:
        break
    else:
        cnt+=1
print(cnt)


### FIXED CODE ###

N,X = map(int, input().split())
L = list(map(int,input().split()))
d = 0
cnt = 1
for i in range(N):
    d = d + L[i]
    if d>X:
        break
    else:
        cnt+=1
print(cnt)
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n,k=MI()
lis=LI()
lis.sort(reverse=True)
while lis[-1]>10**5:
    lis.append(lis[-2]%lis[-1])
    n+=1
#print(lis)
lis.sort()
ex=[0 for i in range(lis[-1])]
for i in range(1,n):
    if ex[lis[i]%lis[-1]]==0:
        ex[lis[i]%lis[-1]]+=1
    if ex[lis[-1]-lis[i]%lis[-1]-1]==0:
        ex[lis[-1]-lis[i]%lis[-1]-1]+=1
#print(ex)
for i in range(n):
    if lis[i]<k:
        break
    elif lis[i]==k:
        print("POSSIBLE")
        sys.exit()
    elif ex[(lis[i]-k)%lis[-1]]==1:
        print("POSSIBLE")
        sys.exit()
print("IMPOSSIBLE")
    
    
    






        
        
    
    
        
    
    


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n,k=MI()
lis=LI()
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
lis.sort()
x=lis[0]
for i in range(n-1):
    x=gcd(x,lis[i+1])
if lis[-1]-k>=0 and (lis[-1]-k)%x==0:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
#-*- coding: utf-8 -*-
"""
oj dl https://atcoder.jp/contests/abc116/tasks/abc116_d -d test-d
oj test -d test-d -c "python abc116d.py"
oj test -d test-d -c "python abc116d.py" test-d/sample-3.in
"""

from collections import defaultdict
import sys
import time
import logging



def deco(func):
    def wrapper(*args, **kwargs):
        s = time.time()
        #print('--start--')
        ret = func(*args, **kwargs)
        logging.debug('--end in %f --' % (time.time() - s))
        return ret

    return wrapper


def sol_wrong(n):
    if n <= 0: return 0
    dp = [0] * (n+1)

    dp[1] = 0
    if n == 1:
        return dp[n]
    if n == 2:
        return 1
    if n == 3:
        return 3
    # dp[2] = 1
    # dp[2] = 3
    # dp[4] = 5

    for i in range(3, n+1):
        dp[i] = dp[i-2] + i

    return dp[n]


def sol_lte():
    if n <= 0: return 0
    dp = [0] * (n+1)
    dp[1] = 0
    if n == 1:
        dp[1] = 0
        return dp[1]
    if n == 2:
        dp[2] = 1
        return dp[2]
    dp[2] = 1
    for i in range(3, n+1):
        dp[i] = dp[i-1] + i - 1
    return dp[i]


def sol(n):
    if n <= 0: return 0
    dp = [0] * (n+1)
    dp[1] = 0
    if n == 1:
        return 0
    if n == 2:
        return 1
    dp[2] = 1

    x = n - 1
    if x % 2 == 0: # even
        return ((x + 1) * int(n/2))
    else: # odd
        return ((x + 1) * int(n/2)) + int((n+1)/2)



do_submit = True
#do_submit = False
if do_submit:
    logging.basicConfig(level=logging.ERROR, format="%(message)s")
else:
    logging.basicConfig(level=logging.DEBUG, format="%(message)s")

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [[x.strip() for x in line.split()] for line in lines]
    n, k = parsed_lines[0]
    n = int(n)
    k = int(k)
    S = parsed_lines[1][0]
    return (n, k, S)


if not do_submit:
    n, k, S = input_parse("""
    14 2
    11101010110011
    """)
    print(sol(n, k, S))

    n, k, S = input_parse("""
    5 1
    00010
    """)
    print(sol(n, k, S))

    n, k, S = input_parse("""
    1 1
    1
    """)
    print(sol(n, k, S))


else:
    # str = ""
    # str += input().strip() + "\n"# n, k
    # str += input().strip() # S
    # n, k, S = input_parse(str)
    n = int(input().strip())
    print (sol(n))




### FIXED CODE ###

#-*- coding: utf-8 -*-
def sol(n):
    if n <= 0: return 0
    if n == 1:
        return 0
    if n == 2:
        return 1
    x = n - 1
    if x % 2 == 0: # even
        return ((x + 1) * int(x/2))
    else: # odd
        return ((x + 1) * int(x/2)) + int((x+1)/2)



n = int(input().strip())
print (sol(n))
R = input()
print(2*3.14*R)

### FIXED CODE ###

R = int(input())
print(2*3.14*R)
import math
r = int(input())

a = math.pi * r**2
b = math.pi * r * 2

print(str(a) + " " + str(b))

### FIXED CODE ###

Input = float(input())
Area = Input**2*3.141592653589
Circumference = Input*2*3.141592653589
print('{0:.6f} {1:.6f}'.format(Area,Circumference))
n = input()

f = []
f[1] = 1

for i in range(n):
  A[i] = input()
  for j in range(2000):
    if(j + A[i] < 2000 && f[j] == 1):
      f[j + A[i]] == 1
    
Q = input()
for i in range(Q):
  B[i] = input()
    if(f[B[i] - 1] == 1):
      print "yes"
    else:
      print "no"

### FIXED CODE ###

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

def s(i, m):
  if m == 0:
    return True
  if i >= n or m > sum(A):
    return False
  r = s(i + 1, m) or s(i + 1, m - A[i])
  return r

for j in range(Q):
  if s(0, m[j]):
    print "yes"
  else:
    print "no"
# -*- coding: utf-8 -*-
from sys import stdin
import math

in_strings = lambda: stdin.readline()[:-1] # s = in_strings()
in_int = lambda: int(stdin.readline()) # N = in_int()
in_intlist = lambda: list(map(int, stdin.readline().split())) # List = in_intlist()

N, A, B, K = in_intlist()
NUM = 998244353

# 逆元
Inv = [0 for _ in range(N)]
for i in range(N):
    Inv[i] = pow(i+1, NUM-2, NUM)

# Combination
Comb = [0 for _ in range(N+1)]
Comb[0] = 1
for i in range(1, N+1):
    Comb[i] = (Comb[i-1] * (N-i+1) * Inv[i-1]) % NUM


ans = 0
for i in range(N+1):
    if ((K - i*A) % B == 0) and ((K - i*A) // B <= N):
        ans = (ans + Comb[i]*Comb[(K - i*A) // B]) % NUM 

print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-
from sys import stdin
import math

in_strings = lambda: stdin.readline()[:-1] # s = in_strings()
in_int = lambda: int(stdin.readline()) # N = in_int()
in_intlist = lambda: list(map(int, stdin.readline().split())) # List = in_intlist()

N, A, B, K = in_intlist()
NUM = 998244353

# 逆元
Inv = [0 for _ in range(N)]
for i in range(N):
    Inv[i] = pow(i+1, NUM-2, NUM)

# Combination
Comb = [0 for _ in range(N+1)]
Comb[0] = 1
for i in range(1, N+1):
    Comb[i] = (Comb[i-1] * (N-i+1) * Inv[i-1]) % NUM


ans = 0
for i in range(N+1):
    if ((K - i*A) % B == 0) and (0 <= (K - i*A) // B <= N):
        ans = (ans + Comb[i]*Comb[(K - i*A) // B]) % NUM 

print(ans)
import sys, bisect

def main():
    _,M,*A = map(int, open(0).read().split())

    A.sort()
    for _ in range(M):
        a = int(A.pop() / 2)
        bisect.insort_left(A,a)

    print(sum(A))

if __name__=='__main__':
    main()

### FIXED CODE ###

import sys

def main():
    _,S = open(0).read().split()
    s1 = S[:int(len(S)*3/4)+1]

    maxLen = 0
    lenS1 = len(s1)
    for i in range(lenS1):
        for j in range(i+1+maxLen,lenS1):
            # print(s1[i:j], S[j:], j,i)
            if len(s1[i:j]) > len(S[j:]):
                break
            if s1[i:j] in S[j:]:
                maxLen = j-i
            else:
                break

    print(maxLen)

if __name__ == '__main__':
    main()
from collections import deque
import sys
import time
start=time.time()
input = lambda: sys.stdin.readline()[:-1]
n=int(input())
data=[deque(map(int,input().split())) for i in range(n)]
last=n*(n-1)
count=0
while last:
	flag=1
	count+=1
	taisenzumi=[0]*n
	for i in range(n):
		if data[i]:
			aite=data[i][0]
			if data[aite-1][0]==i+1:
				if taisenzumi[i]:continue
				if taisenzumi[aite-1]:continue				
				
				data[i].popleft()
				data[aite-1].popleft()
				taisenzumi[aite-1]=1
				taisenzumi[i]=1
				last-=2
				flag=0
			else:continue
	if flag:
		break
	if time.time()-start>1.9:
		print(1000*999//2)
		exit()
else:
	print(count)
	exit()
print(-1)




### FIXED CODE ###

s=list(input())
t=list(input())
count=0
for i in range(3):
	if s[i]==t[i]:
		count+=1
print(count)
from fractions import gcd
def lcm(a,b):
    return a*b//gcd(a,b)
n=int(input())
s=1
for i in range(n):
    t=int(input())
    s=lcm(a,t)
print(s)

### FIXED CODE ###

from fractions import gcd
a=1
for _ in[0]*int(input()):
    t=int(input())
    a*=t//gcd(a,t)
print(a)