peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
from math import ceil
n,h = map(int, input().split())
ab = sorted([list(map(int, input().split())) for _ in range(n)], key=lambda x: x[1], reverse= True)

ans = 0
t = 0
for a,b in ab:
  ans += 1
  t += b
  if h <= b:
    print(ans)
    exit()

p = max([a for a,b in ab])
count = [a for a,b in ab].count(p)
ans = 0
t = 0
for a,b in ab:
  if a == p and count == 1:
    t += b
    print(ans+1+ceil((h-t)/a))
    exit()
  else:
    t += b
    ans += 1
    if a == p: count -= 1
# Judge status: Accepted
n = int(input())
A = map(int,input().split())

mod = 1000000007

ans = 0
tmp1, tmp2 = 0, 0

for m in A:
  tmp1 = (tmp1+m) %mod
  tmp2 = (tmp2+m*m%mod)%mod
  
ans = ((tmp1*tmp1)%mod-tmp2)%mod

if ans%2 ==0:
  ans = ans/2
else:
  ans =(ans+mod)/2

print(int(ans))
# Judge status: Accepted
N, K = map(int, input().split())
S = input()
cnt =0
for i in range(N-1):
    p = S[i]+S[i+1] 
    if p =='RL':
        cnt += 1
cnt2 = 0
if S[0] == 'L':
    cnt2 += 1
if S[-1] == 'R':
    cnt2 += 1
n =N- cnt *2-cnt2
if cnt - 1 >= K:
    print(n+2*K)
elif cnt + cnt2 - 2 >= K:
    print(N-2)
else:
    print(N-1)
# Judge status: Wrong Answer
W, H, N = map(int, input().split())
xl, yl = 0, 0
xr, yr = W, H
for i in range(N):
    x, y, a = map(int, input().split())
    if a == 1:
        if x > xl:
            xl = x
    elif a == 2:
        if x < xr:
            xr = x
# Judge status: Wrong Answer
x = list(input())
y = list(input())

if x[0] == y[2] and x[1] == y[1] and x[2] == y[0]:
    print('yes')
else:
    print('no')
# Judge status: Wrong Answer
# coding: utf-8
n,k = map(int, input().split())
s   = input()

ans = 0
for i in range(n-1):
  if s[i] == s[i+1]:
    ans += 1

ans += 2 * k

print(n-1,ans)
# Judge status: Accepted
n = int(input())
s = input()

ss=str()

for i in s:
    t = chr(ord(i) + n)
    
    if ord(t) > ord('Z'):
        t = chr(ord(t) - ord('Z') + ord('A')-1)
    
    ss += t

print(ss)
# Judge status: Accepted
import heapq

n, m = map(int, input().split())
list_score = list(map(int, input().split()))
list_kard = [list(map(int, input().split(" "))) for i in range(m)]

list_kard.sort(key=lambda x: x[1], reverse=True)
heapq.heapify(list_score)

for i in range(m):
    k = list_kard[i]
    for _ in range(k[0]):
        if list_score[0] < k[1]:
            heapq.heappop(list_score)
            heapq.heappush(list_score, k[1])
        else:
            break

print(sum(list_score))
# Judge status: Wrong Answer
A, B, C = input().split()

if (C >= A)and(C <= B):
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
x = input()
if x in "753":
  print('Yes')
else:
  print('No')
# Judge status: Accepted
H = int(input())
e = 1
h = H
while h != 1:
    h = h // 2
    e += 1

print(2 ** e - 1)
# Judge status: Accepted
a = int(input())
b = int(input())
if a+b == 3:
    print(3)
elif a+b == 4:
    print(2)
elif a+b == 5:
    print(1)
# Judge status: Accepted
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

N,M = MI()
ab = [tuple(MI()) for _ in range(N)]
cd = [tuple(MI()) for _ in range(M)]

for i in range(N):
    a,b = ab[i]
    min_dis = 10**10
    k = 100
    for j in range(M):
        c,d = cd[j]
        if min_dis > abs(a-c) + abs(b-d):
            k = j+1
            min_dis = abs(a-c) + abs(b-d)
    print(k)
# Judge status: Wrong Answer
import sys
n,k = map(int,input().split())
ls = list(map(int,input().split()))
p = len(list(set(ls)))
if p <= k:
    print(0)
    sys.exit()
di=[float("inf")]*n
for i in range(n):
    if di[ls[i]-1] == float("inf"):
        di[ls[i]-1] = 1
    else:
        di[ls[i]-1] += 1
di.sort(reverse=True)
q = 0 
while True:
    s = di.pop()
    p -= s
    q += s
    if p <= k:
        print(q)
        sys.exit()
# Judge status: Accepted
a,b,x = map(int,input().split())

if a%x == 0:
    ans = b//x - a//x + 1

else:
    ans = b//x - (a + x - a%x)//x + 1

print(ans)
# Judge status: Accepted
def main():
    n = int(input())
    ans = 0
    for i in range(1, n+1):
        x = len(str(i))
        if x % 2:
            ans += 1
    print(ans)

main()
# Judge status: Wrong Answer
N,K=map(int,input().split())
L=[i for i in range(N+1)]
p=10**9 + 7
L_min=sum(L)
L_max=L_min
ans=0
for i in range(N,K-1,-1):
  L_min=L_min-L[i]-1
  L_max=L_max-L[-i-1]
  ans += (L_max-L_min)%p
print(ans%p)
# Judge status: Wrong Answer
from sys import stdin,stdout
Pi = lambda x: stdout.write(str(x) + '\n')
S = lambda x: x*(x+1) // 2
R = lambda:stdin.readline()
Ri = lambda x:map(int,x.split())

def main():  	
	for x in stdin:
		a,b =  Ri(x)
		if a<10:a = 10 - a
		Pi(b+(100*a))
				
if __name__ == "__main__":
    main()
# Judge status: Accepted
n=int(input())
if n//90==1 or n%10==9:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import math

n = int(input())
A, B = [], []
for _ in range(n):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)
A.reverse()
B.reverse()

cnt = 0
for a, b in zip(A, B):
    a += cnt
    cnt += math.ceil(a/b) * b - a
print(cnt)
# Judge status: Accepted
import math

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

ans = (n // (a + b)) * a
ans += min((n % (a + b)), a)
print(ans)
# Judge status: Wrong Answer
# input
N, T = map(int, input().split())
rhr = []
r_append = rhr.append
for i in range(1, N + 1):
    c, t = map(int, input().split())
    r_append(
        {
            "index": i,
            "cost": c,
            "time": t
        }
    )

target_routes = [
    r
    for r in rhr
    if r["time"] < T
]

if not target_routes:
    print("TLE")
else:
    rhr.sort(key=lambda x: x["cost"] / x["time"])
    print(rhr[0]["index"])
# Judge status: Accepted
from collections import Counter
w = input()

d = {}
for i in w:
  if i not in d: d[i] = 1
  else: d[i] += 1
print("Yes" if all(i%2 == 0 for i in d.values()) else "No")
# Judge status: Accepted
from itertools import accumulate
from math import pow

X = int(input())

for t, max_d in enumerate(accumulate(range(int(pow(10, 9))))):
    if max_d >= X:
        print(t)
        break
# Judge status: Accepted
a, b, k = [int(w) for w in input().split()]
 
ak = a + k
bk = b - k + 1
 
for i in range(a, min(ak, b+1)):
    print(i)
for i in range(max(ak, bk), b + 1):
    print(i)
# Judge status: Wrong Answer
n,x,t=map(int,input().split())

count=2
item=0
time=0

while True:
  if n > item:
    item=x*count
    time=t*count
  
  if n <= item:
    break
  
  count+=1

print(time)
# Judge status: Accepted
import math
from collections import deque
def main():
    n = int(input())
    a = [int(t)for t in input().split()]
    a_rev = a[::-1]

    cusum = [a[0]]
    rcusum = [a_rev[0]]

    for i in range(1,n):
        cusum.append(cusum[i-1]+a[i])
        rcusum.append(rcusum[i-1]+a_rev[i])
    
    rcusum = rcusum[::-1]

    result = []

    for i in range(1,n):
        result.append(abs(cusum[i-1]-rcusum[i]))

    print(min(result))

if __name__ == "__main__":
    main()
# Judge status: Accepted
n = int(input())
x = list(map(int, input().split()))

lst = sorted(x)
small_med = lst[n // 2 - 1]
big_med = lst[n // 2]

for num in x:
    if num > small_med:
        print(small_med)
    else:
        print(big_med)
# Judge status: Accepted
def func():
    global n,m,k
    for i in range(n+1):
        for j in range(m+1):
            tmp = i*m + j*n -(j*i)*2
            if tmp == k:
                return "Yes"
    return "No"
n,m,k = map(int,input().split())
ans = func()
print(ans)
# Judge status: Accepted
def resolve():
    A, B, K = [int(i) for i in input().split()]
    offset = 0
    while offset < K and A + offset <= B:
        print(A + offset)
        offset += 1
    begin = A + offset
    r = max(B - K + 1, begin)
    while r <= B:
        print(r)
        r += 1


resolve()
# Judge status: Wrong Answer
import fractions

A, B = map(int, input().split())

i = fractions.gcd(A, B)

C = []

for j in range(2, i//2+1):
    while True:
        if i%j == 0:
            i //= j
            C.append(j)
        else:
            break

print(len(set(C))+1)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))

ans = 0
M = 10**9+7
for i in range(60):
    for j in range(N):
        x = 0
        if A[j]>>i & 1:
            x += 1
    now = x * (N - x) % M
    for j in range(i):
        now = now * 2 % M
    ans += now
    ans %= M
print(ans)
# Judge status: Wrong Answer
a,b,c = input().split()
print(str(c)+" "+str(b)+" "+str(a))
# Judge status: Accepted
X,Y=map(int,input().split())
if X%Y==0: print(-1)
else: print(X)
# Judge status: Wrong Answer
import sys

def main():
    x = int(input())
    i = 100
    n = 1
    cnt = 0
    
    while True:
        n += 0.01
        cnt += 1
        print(i*n)
        if(i*n>x-1):
            print(cnt)            
            break
            sys.exit()

    
if __name__ == "__main__":
    main()
# Judge status: Accepted
import fractions
A,B = map(int,input().split())
print(int((A*B/fractions.gcd(A,B))))
# Judge status: Accepted
x = int(input())
print((x // 500) * 1000 + ((x % 500) // 5) * 5)
# Judge status: Accepted
n, m, k = list(map(int, input().split()))

flag = False
for y in range(m+1):
    for x in range(n + 1):
        if n * y + m * x - 2 * x * y == k:
            flag = True
            break
print("Yes" if flag else "No")
# Judge status: Accepted
import sys
from collections import defaultdict
input = sys.stdin.readline
N, M = map(int, input().split())
g = defaultdict(list)
for i in range(M):
  a, b = map(int, input().split())
  g[a].append(b)
  g[b].append(a)
que = [1]
ans = [0 for _ in range(N+1)]
while len(que)>0:
  current = que.pop(0)
  for next in g[current]:
    if ans[next] == 0:
      que.append(next)
      ans[next] = current
print('Yes')
for i in range(2,N+1):
  print(ans[i])
# Judge status: Accepted
s = input()
for i in range(8):
    if s[:i] + s[i+len(s)-7:] == "keyence":
        print("YES")
        exit()
print("NO")
# Judge status: Accepted
S = list(input())
i=0
while i<len(S):
    if S[i]=="?":
        S[i]="D"
    i+=1
print("".join(S))
# Judge status: Accepted
s = input()

if 'RRR' in s:
   result = 3
elif 'RR' in s:
   result = 2
elif 'R' in s:
   result = 1
else:
   result = 0

print(result)
# Judge status: Wrong Answer
n = int(input())
ans = []
for i in range(10**5):
    if n == 0:
        break
    if n%pow(2,i+1) != 0:
        ans.append('1')
        n -= pow(-2,i)
    else:
        ans.append('0')
    

ans = ans[::-1]
ans_s = ''.join(ans)
print(ans_s)
# Judge status: Accepted
k=int(input())
a,b=map(int,input().split())
for i in range(a, b+1):
    if i%k==0:
        print("OK")
        exit(0)
print("NG")
# Judge status: Accepted
arr = list(map(lambda x: int(x), input().split(" ")))

if arr.count(5) == 2 and arr.count(7) == 1:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
a,b,k = map(int,input().split())

k = k-1
i = a
while True:
    print(i)
    i += 1
    if  i > a + k or i > b:
        break
if i < b-k:
    i = b-k
while i <= b:
    print(i)
    i += 1
# Judge status: Accepted
a,b,c=map(int, input().split())
print('{:.0f}'.format(a*b/2))
# Judge status: Wrong Answer
n=int(input())
l=list(map(int,input().split()))
xl=list(reversed(l))
g=[]
a=1
k=0
f=0
for i in xl:
  k+=i
  g.append(k)
g.reverse()
for i in range(len(g)):
  if a<=0:
    f+=1
    break
  if g[i]>=a:
    g[i]=a
  a-=l[i]
  a*=2
if f==0:
  print(sum(g))
else:
  print(-1)
# Judge status: Accepted
a, b, c, d = map(int, input().split())

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(x, y):
    return (x * y) // gcd(x, y)

e = lcm(c, d)

x = b - a + 1
y = b // c - (a - 1) // c
z = b // d - (a - 1) // d
w = b // e - (a - 1) // e

print(x - y - z + w)
# Judge status: Accepted
S = input()

if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n, m = map(int, input().split())

if n == m == 1:
    print("1")
elif n == 1:
    print(max(0,m-2))
elif m == 1:
    print(max(0,n-2))
else:
    print((max(0,n-2)) * (max(0,m-2)))
# Judge status: Accepted
N, P = map(int,input().split())
A = list(map(int,input().split()))
dp = [[0,0] for k in range(N+1)]
dp[0][0] = 1
for k in range(N):
    if A[k]%2 == 0:
        dp[k+1][0] = dp[k][0]*2
        dp[k+1][1] = dp[k][1]*2
    else:
        dp[k+1][0] = dp[k][0] + dp[k][1]
        dp[k+1][1] = dp[k][1] + dp[k][0] 
print(dp[N][P])
# Judge status: Accepted
n=int(input())
def f(n):
    six=(n+1)//2
    five=n-six
    return 6*six+5*five
l,r,ans=0,10**18,-1
while(l<=r):
    m=(l+r)//2
    if(f(m)>=n):
        ans=m
        r=m-1
    else:
        l=m+1
print(ans)
# Judge status: Wrong Answer
s=str(input())
ans=10**9
for i in range(len(s)-3):
    ans=min(ans,abs(753-int(s[i:i+3])))
print(ans)
# Judge status: Wrong Answer
s=list(input())
a=0
z=0

for i in range(len(s)):
  if i=="A":
      a=i
      break

ss=s.reverse()
for i in range(len(s)):
    if i=="Z":
        z=i
        break
    
print(len(s)-(a+z))
# Judge status: Accepted
s = input()
cnt = 0
maxcnt = 0
for c in s:
    if c == 'R':
        cnt += 1
    else:
        cnt = 0
    if maxcnt < cnt:
        maxcnt = cnt
print(maxcnt)
# Judge status: Accepted
def main():
    x, k, d = map(int, input().split())

    if k >= abs(x) // d:
        a = abs(x) - d * (abs(x) // d)
        b = abs(a - d)
        left_number = k - (abs(x) // d)
        if left_number % 2 == 0:
            minimum = a
        else:
            minimum = b

    else:
        minimum = abs(x) - k * d

    print(minimum)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer



def resolve():
    H, N = map(int, sys.stdin.readline().split())
    m = map(int, sys.stdin.read().split())
    AB = zip(m, m)
    INF = 10**20
    dp = [INF]*(H+10**4)
    dp[0] = 0
    for a, b in AB:
        for j in range(H+10**4):
            dp[j] = min(dp[j], dp[j-a] + b if j-a >= 0 else INF)
    return min(dp[H:])


if __name__ == 'main':
    print(resolve())
# Judge status: Accepted
from collections import Counter

n = int(input())
d = list(map(int, input().split()))
mod = 998244353
cnt = Counter(d)

if d[0] != 0 or cnt[0] != 1:
    print(0)
    exit()

ans = 1
for i in range(len(cnt)+1):
    ans *= pow(cnt[i], cnt[i+1], mod)
    ans %= mod
print(ans)
# Judge status: Accepted
D, T, S = map(int, input().split())

if T * S >= D:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
K, S = map(int, input().split())
x = S if K>S else K

ans = 0
for i in range(x+1):
  x1 = S-i
  for j in range((K if x1>K else x1)+1):
    x2 = S-i-j
    for k in range((K if x2>K else x2)+1):
      if i+j+k==S:
        print("{} {} {}".format(i,j,k))
        ans += 1
print(ans)
# Judge status: Accepted
def resolve():
    inp = input()

    c0 = inp.count('0')
    c1 = inp.count('1')

    print(min(c0, c1)*2)

resolve()
# Judge status: Accepted
a, b, k = map(int, input().split())
ans = []
for i in range(a, min(a+k, b+1)):
    if i not in ans:
        ans.append(i)
for i in range(max(a, b-k+1), b+1):
    if i not in ans:
        ans.append(i)

[print(x) for x in ans]
# Judge status: Wrong Answer
n,y=map(int, input().split())

for i in range(n + 1):
    for j in range(n - i + 1):
        if i *10000 + j * 5000 * (n-i-j) * 1000 == y:
            print(i, j, n-i-j)
            exit()
print("-1 -1 -1")
# Judge status: Wrong Answer
n = input()
a = list(map(int, n))

print(str(max(a)) * 3)
# Judge status: Accepted
n, k = map(int,input().split())
r,s,p = map(int,input().split())
t = input()
getpoint = {'r':p,'s':r,'p':s}
ans = 0
for i in range(k):
    point = getpoint[t[i]]
    ans += point
    j = i+k
    while j <= n-1:
        if t[j] == t[j-k] and point != 0:
            point = 0
            j += k
        else:
            point = getpoint[t[j]]
            ans += point
            j += k
print(ans)
# Judge status: Wrong Answer
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

list = [a, b, c, d, e]

can = False
for i in range(len(list)):
  for j in range(len(list)):
    if i == j:
      continue
    if list[i] * list[j] <= k:
      can = True
      
if can:
  print("Yay!")
else:
  print(":(")
# Judge status: Accepted
l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
s = input()
 
print(7 - l.index(s))
# Judge status: Accepted
N, W = map(int, input().split())
w = []
v = []
for _ in range(N):
    x, y = map(int, input().split())
    w.append(x)
    v.append(y)
dp = [[0 for _ in range(W+1)] for _ in range(N+1)]
for i in range(1, N+1):
    for j in range(1, W+1):
        dp[i][j] = max(dp[i][j], dp[i-1][j])
        if j - w[i-1] < 0:
            continue
        dp[i][j] = max(dp[i-1][j], dp[i-1][j-w[i-1]] + v[i-1])
# print(*dp, sep='\n')
print(dp[N][W])
# Judge status: Wrong Answer
N = int(input())
A = list(map(int,input().split()))
from fractions import gcd
mod = 10**9+7
g = A[0]
for a in A[1::]:
  g = g*a//gcd(g,a)

ans = 0
b = g%mod
for a in A:
  ans += b//a
  ans %= mod
  
print(ans%mod)
# Judge status: Wrong Answer
h,w=map(int,input().split())
if h<2 or w<2:
	print(0)
elif h%2==0 or w%2==0:
	print(int(h*w/2))
else:
	print(int(h*w/2)+1)
# Judge status: Accepted
route=''
sx,sy,tx,ty=map(int,input().split())
h=abs(ty-sy)
w=abs(tx-sx)
for i in range(h):
    route+=str("U")
for j in range(w):
    route+=str("R")
for i in range(h):
    route+=str("D")
for i in range(w+1):
    route+=str("L")
for i in range(h+1):
    route+=str("U")
for i in range(w+1):
    route+=str("R")
route+=str("D")
route+=str('R')
for i in range(h+1):
    route+=str("D")
for i in range((w+1)):
    route+=str("L")
route+=str("U")
print(route)
# Judge status: Accepted
import math
n=int(input())
print(math.ceil(n/2))
# Judge status: Accepted
A,B,C = sorted(map(int,input().split()))
ans = 0

for n in range(50):
  if A==B==C:
    break
  elif A<C and B<C:
    A+=1
    B+=1
    ans+=1
  elif A<C and B==C:
    A+=2
    ans+=1
  else:
    B+=1
    C+=1
    ans+=1
    
print(ans)
# Judge status: Accepted

X, Y = map(int, input().split())

print(X + Y // 2)
# Judge status: Accepted
if '7' in input():
    print("Yes")
else:
    print("No")
# Judge status: Accepted
def getStr(vars):
    if len(vars)==N:
        print(getPrintStr(vars))
        return
    
    vars.append(0)
    for i in range(0,max(vars)+2):
        vars[-1] = i
        #print(":", i, vars)
        getStr(vars)
    del vars[-1]
    return

def getPrintStr(vars):
    ret = ""
    for i in range(len(vars)):
        ret += "abcdefghijkl"[vars[i]]
    return ret

N = int(input())
 
getStr([0])
# Judge status: Accepted
n=int(input())
print(n*(n+1)//2)
# Judge status: Accepted
n = int(input())
sp_list = [input().split() for i in range(n)]
for i in range(n):
    sp_list[i][1] = int(sp_list[i][1])
    sp_list[i].append(i + 1)
sp_list.sort(key=lambda x: x[1], reverse=True)
sp_list.sort(key=lambda x: x[0])
[print(sp[2]) for sp in sp_list]
# Judge status: Accepted
n,m=map(int,input().split())
for i in range(m):
    print(i+1,2*m-i+(n%2==0 and 2*(m-i)-1>=n//2))
# Judge status: Wrong Answer
n,m=map(int,input().split())
h=list(map(int,input().split()))
for i in range(m):
  a,b=map(int,input().split())
  if h[a-1]>h[b-1]:
    h[b-1]=0
  elif h[a-1]<h[b-1]:
    h[a-1]=0
print(n-h.count(0))
# Judge status: Accepted
n=int(input(''))
s=input('')
s=s.split(' ')
p=1
f=0
t=0

for a in range(n):
    s[a]=int(s[a])

for b in s:
    if b==0:
        t=1

if t==1:
    print(0)
else:
    for a in range(n):
        p=p*s[a]

        if p>10**18:
            f=1
            break


    if f==1:
        print(-1)
    else:
        print(p)
# Judge status: Accepted
s = input()[::-1]
 
sum_of_digits = 0
 
cnts = [0] * 2019
 
cnts[0] = 1
 
d = 1
 
for c in s:
    sum_of_digits += int(c) * d
    sum_of_digits %= 2019
    d *= 10
    d %= 2019
    cnts[sum_of_digits] += 1
 
ans = 0

for cnt in cnts:
    ans += cnt * (cnt - 1) // 2
 
print(ans)
# Judge status: Accepted
import sys
Sa = list(input())
Sb = list(input())
Sc = list(input())
player = 'a'
while True:
    if player == 'a':
        if Sa == []:
            print('A')
            sys.exit()
        player = Sa.pop(0)
    if player == 'b':
        if Sb == []:
            print('B')
            sys.exit()
        player = Sb.pop(0)
    if player == 'c':
        if Sc == []:
            print('C')
            sys.exit()
        player = Sc.pop(0)
# Judge status: Accepted
n, k = map(int, input().split())

x1 = n % k
x2 = k - x1
ans = min(x1, x2)

print(ans)
# Judge status: Wrong Answer
a,b = input().split()
list = [a, b]
list.sort()
print(int(list[0]))
# Judge status: Accepted
X, A, B = [ int(v) for v in input().split(" ") ]

# A: 3 B: 4 X: 3

result = A - B

if result >= 0:
  print("delicious")
elif abs(result) > X:
  print("dangerous")
else:
  print("safe")
# Judge status: Wrong Answer
a = int(input())
s = input() if a < 3200 else "red"
print(s)
# Judge status: Accepted
length = len(str(input()))
print("x"*length)
# Judge status: Accepted
a, b = input().split()

for i in range(10000):
  if i*i == int(a+b):
    print("Yes")
    exit()

print("No")
# Judge status: Accepted
n, k = map(int, input().split())
print((n - 2) // (k - 1) + 1)
# Judge status: Accepted
a,b=map(int,input().split())

if (a+b)%2==0:
    print(int((a+b)/2))
else :
    print('IMPOSSIBLE')
# Judge status: Accepted
a,b,c,x,y = map(int,input().split())

amax = x*a
bmax = y*b

ans = amax+bmax

for _ in range(max(x,y)):
    if x <= 0:
        ans = min(ans-b+2*c,ans)

    elif y <= 0:
        ans = min(ans-a+2*c,ans)

    else:
        ans = min(ans-a-b+2*c,ans)
        
    x-=1
    y-=1
 #   print(x,y,ans)

print(ans)
# Judge status: Accepted
n,k=map(int,input().split())
A=list(map(int,input().split()))

l=0
r=max(A)+1
while r-l>1:
  m=(l+r)//2
  cut=0
  
  for i in range(n):
    cut+=((A[i]+m-1)//m)-1
  if cut>k:
    l=m
  else:
    r=m
print(r)
# Judge status: Accepted
import sys
import numpy as np

N = int(input())

o = [0] * (N+1)
for i in range(1, 100):
    for j in range(1, 100):
        for k in range(1, 100):
            n = int( ((i+j) * (j+k)) + i*i + k*k)
            if n < (N+1):
                o[n] += 1
            if n > 10001:
                break

for i in range(N):
    print(o[i+1])
# Judge status: Accepted
a = int(input())

l = list(map(int, input().split()))
s_l = sorted(l)

big = s_l[a-1]
small = 0

for i in range(a-1):
  small += s_l[i]
if big < small:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
s= input()
s = s.split()
s.sort()
if s == ["5","5","7"]:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
import bisect

ans =0

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

for i in b:
    s = bisect.bisect_right(c,i)
    s_num = n-s

    t = bisect.bisect_left(a,i)
    t_num = t

    ans += s_num * t_num

print(ans)
# Judge status: Accepted

N,A,B = map(int,input().split())
S = input()
total = A+B
for i in range(N):
    if S[i]=='c':
        print('No')
    elif total>0:
        if S[i] == 'a':
            print('Yes')
            total = total-1
        elif S[i] =='b' and B>0:
            print('Yes')
            total = total-1
            B = B-1
        else:
            print('No')
    else:
        print('No')
# Judge status: Accepted
a,b = map(int, input().split())

if a<= 8 and b<= 8 and (a+b)<=16:
  print("Yay!")
else:
  print(":(")
# Judge status: Wrong Answer

A, B = map(int, input().split())

print(A+(A-1) if A==B else max(A, B)+ max(A-1, B-1))
# Judge status: Accepted
N,K,S=map(int,input().split())

A=[0]*N
for i in range(N):
  if i<K:
    A[i]=S
  else:
    if S==10**9:
      A[i]=S-1
    else:
      A[i]=S+1
      
print(*A)
# Judge status: Accepted
X, Y, Z = map(int, input().split())
s = X - (X//(Y+Z))*(Y+Z)
print(X//(Y+Z) if s >= Z else X//(Y+Z)-1)
# Judge status: Wrong Answer
str1, str2 = [s for s in input().split()]
a = str1*int(str2)
b = str2*int(str2)
if a > b:
    print(a)
elif a < b:
    print(b)
else:
    print(a)
# Judge status: Wrong Answer
a=int(input())
sum=0
if a//100==1:
   sum+=1
print(sum)
if a//10==1 or a//10==11:
    sum+=1
print(sum)
print(a//10)
if a%2==1:
    sum+=1
print(sum)
# Judge status: Wrong Answer
A, B = map(int,input().split())
if A < 10 & B < 10:
  print(A * B)
else:
  print(-1)