Harryxun/stf_run huggingface dataset:
def strr():
 a=raw_input()
 return a
def sstrr():
 a=raw_input().split()
 return a
def intt():
 a=int(raw_input())
 return a
def iintt():
 a=[int(s) for s in raw_input().split()]
 return a
def nestt(t):
 a=[raw_input().split() for s in range(t)] 
 return a

nr=iintt()
n=nr[0]
r=nr[1]
a
if n>=10:
 a=r
else:
 a=r+100*(10-n)
print a

### FIXED CODE ###

def strr():
 a=raw_input()
 return a
def sstrr():
 a=raw_input().split()
 return a
def intt():
 a=int(raw_input())
 return a
def iintt():
 a=[int(s) for s in raw_input().split()]
 return a
def nestt(t):
 a=[raw_input().split() for s in range(t)] 
 return a

nr=iintt()
n=nr[0]
r=nr[1]
if n>=10:
 a=r
else:
 a=r+100*(10-n)
print a
import sys

sys.setrecursionlimit(3000)
n, k = map(int, input().split())
pos = [int(i) for i in input().split()]
score = [int(i) for i in input().split()]
if max(score) <= 0:
  print(max(score))
else:
  pos = [0] + pos
  score = [0] + score
  max_point = -10 ** 11
  s_l = [[0]]
  nei = {}
  dic = {}
  loop = 0
  for i in range(1, n + 1):
    f_pos = i
    #print('f_pos',f_pos)
    if f_pos not in nei:
      points = [0]
      count = 0
      loop += 1
      while True:
        n_pos = pos[f_pos]
        points.append(points[-1] + score[n_pos])
        count += 1
        nei[f_pos] = [count, loop]
        if n_pos in nei:
          dic[loop] = count
          break
        f_pos = n_pos
      #print(nei)
      s_l.append(points)
      count = 1
    else:
      loop = nei[f_pos][1]
      count = nei[f_pos][0]
      points = s_l[loop]
    #print(points)
    #print(count)
    loop_num = dic[loop]
    s = points[count - 1]
    m = points[loop_num] - s
    a = k // loop_num
    b = k % loop_num
    if points[loop_num] > 0:
      point = points[loop_num] * a
      if point > max_point and a != 0:
        max_point = point
    else:
      point = 0
      if a > 0:
        b = loop_num
    #print(point)
    if b > 0:
      t_max = -10 ** 11
      if loop_num - count + 1 >= b:
        for j in range(b):
          t = points[j + count] - s
          #print(t)
          if t > t_max:
            t_max = t
      else:
        for j in range(count, loop_num + 1):
          t = points[j] - s
          #print(t)
          if t > t_max:
            t_max = t
        for j in range(1, b - loop_num + count):
          t = points[j] + m
          #print(t)
          if t > t_max:
            t_max = t
      point += t_max
    #print(point)
    if point > max_point:
      max_point = point
  print(max_point)

### FIXED CODE ###

n, k = map(int, input().split())
positions = [int(i) for i in input().split()]
scores = [int(i) for i in input().split()]
if max(scores) <= 0:
  print(max(scores))
else:
  positions = [0] + positions
  scores = [0] + scores
  max_point = -pow(10, 9)
  #print(max_point)
  for i in range(1, n + 1):
    s = []
    f_pos = positions[i]
    score = scores[f_pos]
    s.append(score)
    while f_pos != i:
      f_pos = positions[f_pos]
      score += scores[f_pos]
      s.append(score)
    loop = len(s)
    if loop >= k:
      point = max(s[:k])
    elif s[-1] <= 0:
      point = max(s)
    else:
      loop_c = k // loop
      r = k % loop
      point1 = s[-1] * loop_c
      if r != 0:
        point1 += max(s[:r])
      point2 = s[-1] * (loop_c - 1)
      point2 += max(0, max(s))
      point = max(point1, point2)
    max_point = max(max_point, point)
  print(max_point)
import sys
p = []
for l in sys.stdin:
    a.append(int(l))
s = set()
for i in range(1, len(p)):
    s.add(p[i])
print(len(set(s)))

### FIXED CODE ###

n = int(input())
p = [input() for i in range(n)]
s = set()
for i in range(n):
    s.add(p[i])
print(len(s))
a,b,c = map(str,input().split())
if b == "+":
  print(int(a)+int(b))
else:
  print(int(a)-int(b))

### FIXED CODE ###

a,b,c = map(str,input().split())
if b == "+":
  print(int(a) + int(c))
else:
  print(int(a )- int(c))
N, A, B, C, D = reads()
# index変換
A -= 1; B -= 1
S = input()
if (C<D):
    if ("##" in S[A:D]):
        print("No")
    else:
        print("Yes")
else:
    if ("##" not in S[A:C]) and ("..." in S[A:C]):
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

N, A, B, C, D = [int(x) for x in input().split()]
# index変換
A -= 1; B -= 1
S = input()
if (C<D):
    if ("##" in S[A:D]):
        print("No")
    else:
        print("Yes")
else:
    if ("##" not in S[A:C]) and ("..." in S[B-1:D+1]):
        print("Yes")
    else:
        print("No")
x, n = map(int, input().split())
if n == 0:
  print(x)
  exit()

P = list(map(int, input().split()))
t = x
for i in range(101):
  if not i in P:
    if t > abs(i - x):
      t = abs(i - x)
      ans = i
      
print(ans)
  

### FIXED CODE ###

x, n = map(int, input().split())
if n == 0:
  print(x)
  exit()

P = list(map(int, input().split()))
t = 100
for i in range(0,102):
  if not i in P:
    if t > abs(i - x):
      t = abs(i - x)
      ans = i

print(ans)
import math
a,b,x=map(int,input().split())
if x/2>=a*b/2:
  tangent=a**2 / ((a*b-x/a)*2)
  print(90-math.atan(tangent)*180/math.pi)
else:
  tangent=2*x/(a*(b**2))
  print(90-math.atan(tangent)*180/math.pi)
        
  

### FIXED CODE ###

import math
a,b,x=map(int,input().split())
if x/a>=a*b/2:
  tangent= 2*b/a-2*x/a**3
else:
  tangent=a*b*b /(2*x)
print(math.degrees(math.atan(tangent)))
n = input()
b = 1
a = list(map(str,input().split()))
if "0" in a:
    print(0)
else:
    for i in range(int(a)):
        b *= int(a[i])
    if b > 10**18:
        print(-1)
    else:
        print(b)

### FIXED CODE ###

n = int(input())
b = 1
a = list(map(int,input().split()))
if 0 in a:
    print(0)
else:
    for i in range(n):
        b *= a[i]
        if b > 10**18:
            print(-1)
            break
    if b <=10**18:
        print(b)
N = int(input())
S = list(input())
K = int(input())

for i in range(len(S)):
  if S[i] != S[K]:
    S[i] = '*'
print(''.join(S))

### FIXED CODE ###

N = int(input())
S = list(input())
K = int(input()) - 1

for i in range(len(S)):
  if S[i] != S[K]:
    S[i] = '*'
print(''.join(S))
a,b,c=map(int,input()).split()
print(c if c<=a*b else a*b)

### FIXED CODE ###

a,b,c=map(int,input().split());print(c if c<=a*b else a*b)
from collections import deque

INF = float('inf')

H,W=map(int,input().split())
grid = [input() for i in range(H)]

# 初期の黒('#')の位置からの距離
dist = [[-1]*W for _ in range(H)]

## '#'の位置をキューに追加（＝今回はこれが複数あるので、複数スタートとなる）
black_cells = deque()
for i in range(H):
    for j in range(W):
        if grid[i][j]=="#":
            dist[i][j]=0
            black_cells.append((i,j))

while black_cells:
    x,y=black_cells.popleft()#黒マスのスタート地点
    d=dist[x][y]#スタート地点からの距離
    for dy, dx in ((1, 0), (0, 1), (-1, 0), (0, -1)):
        new_x=x+dx
        new_y=y+dy
        if new_y < 0 or H <= new_y or new_x < 0 or W <= new_x:#範囲からはみ出すとき
            continue
        if dist[new_x][new_y]==-1:
            dist[new_x][new_y]=d+1
            black_cells.append((new_x,new_y))
print(d)


### FIXED CODE ###

from collections import deque

H, W = map(int, input().split())
grid = [input() for i in range(H)]

# 初期の黒('#')の位置からの距離
dist = [[-1]*W for _ in range(H)]

# '#'の位置をキューに追加（＝今回はこれが複数あるので、複数スタートとなる）
black_cells = deque()
for h in range(H):
    for w in range(W):
        if grid[h][w] == '#':
            black_cells.append((h, w))
            dist[h][w] = 0

def bfs(black_cells, dist):
    """
    BFSを用いて、全マス目を黒くする回数を求める

    Args:
        black_cells: 「開始時の黒マス」の座標が入ったキュー（複数座標あり）
        dist: 「開始時の黒マス」からの距離の入ったリスト  [[-1, -1, 0], ...]
        　　　（白マスの初期値は0）

    Returns:
        g: 操作を繰り返した数
    """
    d = 0
    while black_cells:
        # キューとして使うのでpop()ではなくpopleft()
        h, w = black_cells.popleft()
        d = dist[h][w]
        for dy, dx in ((1, 0), (0, 1), (-1, 0), (0, -1)):
            new_h = h + dy
            new_w = w + dx
            if new_h < 0 or H <= new_h or new_w < 0 or W <= new_w:
                continue
            if dist[new_h][new_w] == -1:  # セルが白('.')であるのと同義
                dist[new_h][new_w] = d+1
                black_cells.append((new_h, new_w))
    return d

d = bfs(black_cells, dist)
print(d)
a=int(input())
list1=[]
for i in range(a+1):
  list1.append(input())
  
print(len(list(set(list1))))

### FIXED CODE ###

a=int(input())
list1=[]
for i in range(a):
  list1.append(input())
  
print(len(list(set(list1))))
N=int(input())
A=list(map(int,input().split()))
ans=0
mod=(10**9)+7
for i in range(len(A)-1):
    for j in range(i+1,len(A)):
        ans+=(a^b)
ans=ans%mod
print(ans)

### FIXED CODE ###

x,y,z=map(int,input().split())
if x+y+z>=22:
    print("bust")
else:
    print("win")
a = map(int,input().split(" "))
b = map(int,input().split(" "))
c = map(int,input().split(" "))
bs = sorted(b)
cs = sorted(c)

x = 0

f = range(a[0])
g = range(a[1])

for i in range(a[0]):
    for ii in range(i,a[0]):
        for j in range(a[1]):
            for jj in range(j,a[1]):
                x = x + ((bs[ii] - bs[i]) * (cs[jj] - cs[j]))
                print(bs[ii] , bs[i] , cs[jj] , cs[j] , x)
                if x > (10**9 + 7):
                    x = x % (10**9 + 7)

ans = x


print(ans)

### FIXED CODE ###

a = list(map(int,input().split(" ")))
b = list(map(int,input().split(" ")))
c = list(map(int,input().split(" ")))

x = 0
y = 0

for i in range(1,a[0]):
    x = x + b[i] - b[0]
    
xx = x
for i in range(1,a[0]-1):
    xx = xx - ((b[i] - b[i - 1]) * (a[0] - i))
    x = x + xx

for i in range(1,a[1]):
    y = y + c[i] - c[0]
    
yy = y
for i in range(1,a[1]-1):
    yy = yy - ((c[i] - c[i - 1]) * (a[1] - i))
    y = y + yy

ans = x * y
ans = ans % (10**9 + 7)

print(ans)
n,k=map(int,input().split())
lists=list(map(int,input().split()))
Chlist=[0]*n
countlist=[0]*40
for s in range(n):
    Chlist[s]=format(lists[s],"0%ib"%40)
    for i in range(40):
        if Chlist[s][i]=="1":
            countlist[39-i]+=1

#countlistのi桁めが2**(i-1)の数である
power=0
for i in range(40):
    if 2**i<=k<2**(i+1):
        power=i
        break       
ans1=0
for j in range(power):
    ans1+=(2**j)*max(countlist[j],n-countlist[j])
ans1+=(2**power)*(countlist[power])


uselist=[0]*(k-2**power+1)
for i in range(k-2**power+1):
    c=format(i,"0%ib"%40)
    uselist[i]=c


ans2=0

ans2+=(2**power)*(n-countlist[power])

biggest=0
for i in uselist:
    big=0
    for j in range(40):
        if  i[39-j]=="1" and j!=power:
            big+=(2**j)*(n-countlist[j])
        elif i[39-j]=="0"and j!=power:
            big+=(2**j)*countlist[j]
    biggest=max(biggest,big)

ans2+=biggest
print(max(ans1,ans2))
            

### FIXED CODE ###

n,k=map(int,input().split())
k2=format(k+1,"0%ib"%40)
lists=list(map(int,input().split()))
countlist=[0]*40
for j in lists:
    c=format(j,"0%ib"%40)
    for i in range(40):
        if c[i]=="1":
            countlist[i]+=1

emptylist=[]
for i in range(40):
    if k2[i]=="1":
        emptylist.append(i)
if k>=1:
    ans=0
    for i in emptylist:
        subing=0
        for j in range(40):
            if j<i:
                if k2[j]=="1":
                    subing+=(2**(39-j))*(n-countlist[j])
                elif k2[j]=="0":
                    subing+=(2**(39-j))*countlist[j]
            if j==i:
                subing+=(2**(39-i))*countlist[i]
            
            if j>i:
                subing+=(2**(39-j))*max(countlist[j],n-countlist[j])
        ans=max(ans,subing)
    print(ans)
elif k==0:
    ans=0
    for i in range(40):
        ans+=(2**(39-i))*countlist[i]
    print(ans)
l, r = map(int, input().split())
ans = 2019
for i in range(l, r):
   for i in range(l+1, r+1):
      tmp = i*j % 2019
      if ans > tmp:
         ans = tmp         
      if ans == 0:
         print(ans)
         exit(0)
print(ans)

### FIXED CODE ###

l, r = map(int,input().split())

ans = 2019
for i in range(l, r):
    for j in range(i+1, r+1):
        tmp = i*j % 2019
        if ans > tmp:
            ans = tmp
        if ans == 0:
            print(ans)
            exit(0)
print(ans)
from datetime import datetime,timedelta

a=[1,1,1,1,1]
a[0]=input()
a[1]=input()
a[2]=input()
a[3]=input()
a[4]=input()
a=[int(x) for x in a] 
t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))


### FIXED CODE ###

from datetime import datetime,timedelta

a=input().split()
a=[int(_) for _ in a]

t1=datetime(2000,1,1,a[0],a[1],0)
t2=datetime(2000,1,1,a[2],a[3],0)

delta=t2-t1
total_seconds=delta.seconds

ans=(total_seconds-a[4]*60)/60
print(int(ans))
d,g=map(int,input().split())
pc={_:(list(map(int,input().split()))) for _ in range(d)}
bin_lst=[]
if 1<d:
    d2=d**2-1
else:
    d2=2
for x in range(d2):
    buf=bin(x)[2:]
    len_buf=len(buf)
    if len_buf<d:
        buf='0'*(d-len_buf)+buf
    bin_lst.append(buf)
lst_cnt=[]
buf_lst=[]
for x in bin_lst:
    cnt=0
    buf_int=0
    len_x=len(x)
    for y in range(d):
        if x[y]=="1":
            buf_lst=pc[y]
            buf_int+=(y+1)*100*buf_lst[0]+buf_lst[1]
            cnt+=buf_lst[0]
    if buf_int<g:
        buf_index=x.rfind("0")
        buf_lst=pc[buf_index]
        i=buf_lst[0]
        for z in range(1,i):
            if buf_int+(buf_index+1)*100*z>=g:
                buf_int+=(buf_index+1)*100*z
                cnt+=z
                break
    if buf_int>=g:
        lst_cnt.append(cnt)
print(min(lst_cnt))

### FIXED CODE ###

d,g=map(int,input().split())
pc={_:(list(map(int,input().split()))) for _ in range(d)}
bin_lst=[]
d2=2**d
for x in range(d2):
    buf=bin(x)[2:]
    len_buf=len(buf)
    if len_buf<d:
        buf='0'*(d-len_buf)+buf
    bin_lst.append(buf)
lst_cnt=[]
buf_lst=[]
for x in bin_lst:
    cnt=0
    buf_int=0
    len_x=len(x)
    for y in range(d):
        if x[y]=="1":
            buf_lst=pc[y]
            buf_int+=(y+1)*100*buf_lst[0]+buf_lst[1]
            cnt+=buf_lst[0]
    if buf_int<g:
        buf_index=x.rfind("0")
        buf_lst=pc[buf_index]
        i=buf_lst[0]
        for z in range(1,i):
            if buf_int+(buf_index+1)*100*z>=g:
                buf_int+=(buf_index+1)*100*z
                cnt+=z
                break
    if buf_int>=g:
        lst_cnt.append(cnt)
print(min(lst_cnt))
def cmb(n,r,mod=10**9+7):
    fac = [0] * (n+1)
    finv = [0] * (n+1)
    inv = [0]*(n+1)

    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    
    for i in range(2, n+1):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod - inv[mod%i] * (mod//i) % mod
        finv[i] = finv[i-1] * inv[i] % mod

    if n < r: return 0
    if n < 0 or r < 0: return 0
    return (fac[n]*(finv[r]*finv[n-r]%mod)%mod)

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

if (x+y) % 3 != 0:
    print(0)
    exit()

i = (x+y)//3
j = x-i

print(cmd(i,j))

### FIXED CODE ###

def cmd(n,r,mod=10**9+7):
    fac = [0] * (n+1)
    finv = [0] * (n+1)
    inv = [0]*(n+1)

    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    
    for i in range(2, n+1):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod - inv[mod%i] * (mod//i) % mod
        finv[i] = finv[i-1] * inv[i] % mod

    if n < r: return 0
    if n < 0 or r < 0: return 0
    return (fac[n]*(finv[r]*finv[n-r]%mod)%mod)

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

if (x+y) % 3 != 0:
    print(0)
    exit()

i = (x+y)//3
j = x-i

print(cmd(i,j))
n, m = map(int, input().split())
prefectures = [[] for _ in range(10 ** 5)]

for i in range(m):
    p, y = map(int, input().split())
    prefectures[p].append([y, i])

ans = [''] * m
for p in range(10 ** 5):
    prefecture = prefectures[p]
    prefecture.sort(key=lambda x: x[0])
    for i in range(len(prefecture)):
        ans[prefecture[i][1]] = '{:006}{:006}'.format(p, i + 1)

for i in range(m):
    print(ans[i])


### FIXED CODE ###

n, m = map(int, input().split())
prefectures = [[] for _ in range(10 ** 5)]

for i in range(m):
    p, y = map(int, input().split())
    prefectures[p - 1].append([y, i])

ans = [''] * m
for p in range(10 ** 5):
    prefecture = prefectures[p]
    prefecture.sort(key=lambda x: x[0])
    for i in range(len(prefecture)):
        ans[prefecture[i][1]] = '{:006}{:006}'.format(p + 1, i + 1)

for i in range(m):
    print(ans[i])
n = int(input())
A = [[int(i) for i in input().split()] for j in range(n)]

C = []
D = []
i = 0

for a, b in A:
    C.append((a - b, i))
    D.append((b - a, i))
    i += 1

C.sort()
D.sort()

used = [False] * n
ans = 0

for i in range(n):
    if i % 2 == 0:
        while used[C[-1][1]]:
            C.pop()
        ans += A[C[-1][1]][0]
        used[C[-1][1]] = True
        C.pop()
    else:
        while used[D[-1][1]]:
            D.pop()
        ans -= A[C[-1][1]][1]
        used[C[-1][1]] = True
        D.pop()

print(ans)

### FIXED CODE ###

n = int(input())
A = [[int(i) for i in input().split()] for j in range(n)]

C = []
D = []
i = 0

for a, b in A:
    C.append((a + b, i))
    i += 1

C.sort(reverse=True)
ans = 0

for i, c in enumerate(C):
    if i % 2 == 0:
        ans += A[c[1]][0]
    else:
        ans -= A[c[1]][1]

print(ans)
n = int(input())

a = list(map(int, input().split()))

sorted_a = sorted(a)
reversed_a = reversed(a)

aa = []
for i in range(3*n):
    sorted_a.pop(-1)
    reversed_a.pop(-1)
    aa.append(sorted_a.pop(-1))

print(sum(aa))

### FIXED CODE ###

import sys 
n = int(input())

a = list(map(int, sys.stdin.readline().split()))

sorted_a = sorted(a)
reversed_a = sorted(a, reverse=True)

aa = []
for i in range(n):
    sorted_a.pop(-1)
    reversed_a.pop(-1)
    aa.append(sorted_a.pop(-1))

print(sum(aa))
w, a, b = map(int, input().split())
print(min(b-a-w))

### FIXED CODE ###

w, a, b = map(int, input().split())
dis = abs(a - b) - w
print(max(dis, 0))
import math
N, K = map(int, input().split())
ans = 0
k = 1/N
for i in range(1, N+1):
    if K>i:
        print(math.ceil(math.log2(K/i)))
        ans +=(0.5)**math.ceil(math.log2(K/i))
        print(ans)
    else:
        ans +=1
print(k*ans)

### FIXED CODE ###

import math
N, K = map(int, input().split())
ans = 0
k = 1/N
for i in range(1, N+1):
    if K>i:
        ans +=(0.5)**math.ceil(math.log2(K/i))
    else:
        ans +=1
print(k*ans)
a,b = [int(i) for i in input().split]

if (a<b):
    print(a < b)
elif (a > b):
    print(a > b)
else
    print(a == b)

### FIXED CODE ###

a, b = [int(i) for i in input().split()]
 
if a < b:
    print("a < b")
 
elif a > b:
    print("a > b")
 
else:
    print("a == b")
import sys
N,M = map(int, input(). split())
s = [0,]*M
c = [0,]*M
ans =[10,]*M 
for i in range(M):
    s[i], c[i] = map(int, input(). split())
    if ans[s[i]-1] != 10 and ans[s[i]-1] != c[i]:
        print(-1)
        sys.exit()
    else:
        ans[s[i]-1] = c[i]

if ans[0] == 0:
    print(-1)
    sys.exit()
else:
    A = 0
    for j in range(N):
        if ans[j] == 10:
            ans[j] = 0
    for k in range(N):
        A += 10**(M-(k+1))*ans[k] 
    print(A)
    
    


    

### FIXED CODE ###

import sys
N,M = map(int, input(). split())

s = [0,]*M
c = [0,]*M
ans =[10,]*N



for i in range(M):
    s[i], c[i] = map(int, input(). split())
    if ans[s[i]-1] != 10 and ans[s[i]-1] != c[i]:
        print(-1)
        sys.exit()
    else:
        ans[s[i]-1] = c[i]       
if N >= 2:
        
    A = 0        
    if ans[0] == 0:
        print(-1)
        sys.exit()
    elif ans[0] == 10:
        ans[0] = 1
        for j in range(N):
            if ans[j] == 10:
                ans[j] = 0
        for k in range(N):
            A += 10**(N-k-1)*ans[k] 
    
        print(A)
        
    else:
        for j in range(N):
            if ans[j] == 10:
                ans[j] = 0
        for k in range(N):
            A += 10**(N-k-1)*ans[k] 
        print(A)
else:
    A = 0
    if ans[0] == 0 or ans[0] == 10:
        print(0)
    else:
        print(ans[0])
k = int(input())
s = input()
 
if len(s) < k :
  print(s)
else:
  print(substr(s,0,k)+"...")

### FIXED CODE ###

k = int(input())
s = input()
 
if len(s) <= k :
  print(s)
else:
  print(s[0:k]+"...")
a = int(input())
b = int(input())
c = int(input())
print(c, a, b)

### FIXED CODE ###

lst = list(map(int, input().split()))
print(lst[2], lst[0], lst[1])
n=int(input())
print(n＊＊3)

### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(N: int):
    print(N ** 3)
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()
X,Y,Z,K = (int(num) for num in input().split())
a = [int(num) for num in input().split()]
b = [int(num) for num in input().split()]
c = [int(num) for num in input().split()]
a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

l = []
for i in range(X):
    if i+1 > K break
    
    for j in range(Y):
        if (i+1) + (j+1) > K break
        
        for k in range(Z):
            if (i+1) + (j+1) + (k+1) > K break
            
            l.append(a[i]+b[j]+c[k])
            
            
l.sort(reverse=True)
for i in range(K):
    print(l[i])

### FIXED CODE ###

X,Y,Z,K = (int(num) for num in input().split())
a = [int(num) for num in input().split()]
b = [int(num) for num in input().split()]
c = [int(num) for num in input().split()]
a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)

l = []
for i in range(X):
    if i+1 > K:
        break
    
    for j in range(Y):
        if (i+1) * (j+1) > K:
            break
        
        for k in range(Z):
            if (i+1) * (j+1) * (k+1) > K:
                break
            
            l.append(a[i]+b[j]+c[k])
            
            
l.sort(reverse=True)
for i in range(K):
    print(l[i])
n = int(input())
s = input()
if n%2 == 0:
    cnt = 0
    for i in range(n//2):
        if s[i] == s[i + n//2]:
            cnt += 1
            if cnt == n//2:
                print("Yes")
                break
        else:
            print("No")  
            break
else:
    print("No")

### FIXED CODE ###

n = int(input())
def f():
    for i in range(1, 10):
        for j in range(1, 10):
            if i*j == n:
                return "Yes"
    return "No"
print(f())