Harryxun/stf_run huggingface dataset:
N=int(input())
edges = [0 for i in range(N)]
edge_l = [[] for i in range(N)]
cols = [0 for i in range(N)]
out = 0
seen = [False for i in range(N)]

def paint(cur, parC):
  curC = 1
  seen[cur] = True
  for e in edge_l[cur]:
    if not seen[e[0]]:
      if curC == parC:
        curC+=1
      cols[e[1]] = curC
      paint(e[0], cols[cur])
      curC+=1

for i in range(N-1):
  a,b=map(int,input().split())
  a-=1
  b-=1
  edges[a]+=1
  edges[b]+=1
  edge_l[a].append([b,i])
  edge_l[b].append([a,i])
  out = max(out,edges[a],edges[b])
print(out)
paint(0,0)
for i in range(N-1):
  print(cols[i])

### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)

N=int(input())
edges = [0 for i in range(N)]
edge_l = [[] for i in range(N)]
cols = [0 for i in range(N)]
out = 0
seen = [False for i in range(N)]
seen2 = [False for i in range(N)]

def paint(cur, parC):
  if seen[cur]:
    return
  curC = 1
  seen[cur] = True
  for e in edge_l[cur]:
    if not seen2[e[1]]:
      seen2[e[1]] = True
      if curC == parC:
        curC+=1
      cols[e[1]] = curC
      paint(e[0], curC)
      curC+=1
  return

for i in range(N-1):
  a,b=map(int,input().split())
  a-=1
  b-=1
  edges[a]+=1
  edges[b]+=1
  edge_l[a].append([b,i])
  edge_l[b].append([a,i])
  out = max(out,edges[a],edges[b])
print(out)
paint(0,0)
for i in range(N-1):
  print(cols[i])
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
A = [ list(map(int,input().split())) for _ in range(N) ]

ans = 0
for a,b in A,B:
  ans += 1 if sum([i*j for i,j in a,b])+C>0
 print(ans)

### FIXED CODE ###

N,M,C = map(int,input().split())
B = list(map(int,input().split()))
A = [ list(map(int,input().split())) for _ in range(N) ]
 
ans = 0
for a in A:
  s = 0
  for i in range(M):
    s += a[i] * B[i]
  ans += 1 if s+C > 0 else 0
print(ans)
N = int(input())
b = list(map(int, input().split()))
a = [1, 2, 3, 4, 5]

def f(a, ans):
    if len(a) == 0:
        for i in range(len(ans)):
            print(ans[len(ans) - i - 1])
        exir()
    for i in range(len(a)):
        if i + 1 == a[i]:
            f(a[0:i] + a[i + 1:len(a)], ans + [i + 1])

f(b, [])
print(-1)



### FIXED CODE ###

N = int(input())
b = list(map(int, input().split()))
a = [1, 2, 3, 4, 5]

def f(a, ans):
    if len(a) == 0:
        for i in range(len(ans)):
            print(ans[len(ans) - i - 1])
        exit()
    for i in range(len(a) - 1, -1, -1):
        if i + 1 == a[i]:
            f(a[0:i] + a[i + 1:len(a)], ans + [i + 1])
            break


f(b, [])
print(-1)
import os

if os.argv[1] == os.argv[2]:
  return "Yes"

return "No"

### FIXED CODE ###

test_passed, test_all_cnt  = input().split()
 
print("Yes" if test_passed == test_all_cnt else "No")
N,A,B=map(int,input(),split())
print(min(N*A,B))

### FIXED CODE ###

N,A,B=map(int,input().split())
print(min(N*A,B))
N,K = map(int,input().split())
int tmp = 0

while(){
  N = tmp
  	if(abs(tmp - K) < tmp){
      tmp = abs(tmp - K)
    }
  	else{
      break;
    }
}

print(tmp)

### FIXED CODE ###

import math

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

while True:
  if abs(tmp - K) < tmp:
    tmp = abs(tmp - K)
  else:
    break
 	
print(tmp)
a , b , c = map(int, input().split())
count = 0
if a == 1 and b == 1 and c == 1:
  break
elif a == b and a == c:
  count = -1
else:
  while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    a_copy = a
    b_copy = b
    c_copy = c
    a = int(b_copy / 2 + c_copy / 2)
    b = int(a_copy / 2 + c_copy / 2)
    c = int(b_copy / 2 + a_copy / 2)
    count += 1
  
print(count)

### FIXED CODE ###

a , b , c = map(int, input().split())
count = 0
if a == 1 and b == 1 and c == 1:
  pass
elif a == b and a == c:
  count = -1
else:
  while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    a_copy = a
    b_copy = b
    c_copy = c
    a = int(b_copy / 2 + c_copy / 2)
    b = int(a_copy / 2 + c_copy / 2)
    c = int(b_copy / 2 + a_copy / 2)
    count += 1
  
print(count)
while True:
	N=input()
	if not N:
		break
	a=list(map(int, input().split(" ")))
	ans=1
	for v in a:
		ans*=v
	if 1000000000000000000 < ans:
		ans = -1
	print(ans)


### FIXED CODE ###

N=input()
a=list(map(int, input().split()))
#print(a)
ans=1
for v in a:
	ans*=v
	if 1000000000000000000 < ans:
		ans = -1
		break
if any([v==0 for v in a]):
	ans=0
print(ans)
a,b=map(int, inout().split())
list = input().split(' ')

s = 0
c = !

for item in list:
    c += 1
    if (s + int(item)) <= b:
        s += int(item)
    else:
        break

print(c)

### FIXED CODE ###

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

s = 0
c = 1

for item in list:
    if (s + int(item)) <= b:
        c += 1
        s += int(item)
    else:
        break

print(c)
import math

N, M = list(map(int, input().split()))
S = input()
T = input()

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

success = False;
ans = 0
_lcm = lcm(N, M)
for k in range(1, N*M//_lcm + 1):
    ans = k * _lcm
    s = [(i * ans)//N + 1 for i in range(N)]
    t = [(i * ans)//M + 1 for i in range(M)]

    pool = s + t

    double_st = [x for x in set(pool) if pool.count(x) > 1]
    isImpossible = False

    for st in double_st:
        s_i = s.index(st)
        t_i = t.index(st)
        if S[s_i] != T[t_i]:
            isImpossible = True
            
    if not isImpossible:
        success = True
        break

if not success:
    print(-1)
else:
    print(ans)

### FIXED CODE ###


N, M = map(int, input().split())
S = input()
T = input()

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    c = a % b
    return gcd(b, c)
 
def lcm(x, y):
    return (x * y) // gcd(x, y)

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

success = False
fans = 0

_lcm = lcm(len(S), len(T))

def isImpble(k, _lcm):
    global success
    global S
    global T
    global fans
    
    ans = k * _lcm
    double_st = []
    
    for i in range(len(S)):
        if (len(T)*i)%len(S) == 0 and (len(T) * i)//len(S) <len(T):
            double_st += [(i * ans)//len(S) + 1]
    isImpossible = False

    for st in double_st:
        s_i = ((st-1) * len(S))//ans
        t_i = ((st-1) * len(T))//ans
        if S[s_i] != T[t_i]:
            isImpossible = True
            break

            
    if isImpossible:
        return True
    else:
        success = True
        fans = k*_lcm
        return False
        

imp = isImpble((len(S) * len(T))//_lcm, _lcm)

if not imp:
    for k in range(1, (len(S) * len(T))//_lcm ):
        imp = isImpble(k, _lcm)
        if success:
            break
    

if not success:
    print(-1)
else:
    print(fans)
def checker(x1,y1,x2,y2,xp,yp):
	vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
	if vec > 0:
		return 1
	elif vec < 0:
		return -1

while True:
	try:
		x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
	except EOFError:
		break
	r = checker(x1,y1,x2,y2,xp,yp)
	r += checker(x2, y2, x3, y3, xp, yp)
	r += checker(x3, y3, x1, y1, xp, yp)
	if r == 3 or r == -3:
		print("YES")
	else:
		print("NO")

### FIXED CODE ###

def checker(x1,y1,x2,y2,xp,yp):
	r = 0
	vec = (x2 - x1) * (yp - y1) - (y2 - y1) * (xp - x1)
	if vec > 0:
		r = 1
	elif vec < 0:
		r = -1
	return r

if __name__ == '__main__':
	while True:
		try:
			x1,y1,x2,y2,x3,y3,xp,yp = map(float,raw_input().split())
			r = 0
			r += int(checker(x1,y1,x2,y2,xp,yp))
			r += int(checker(x2, y2, x3, y3, xp, yp))
			r += int(checker(x3, y3, x1, y1, xp, yp))
			if r == 3 or r == -3:
				print("YES")
			else:
				print("NO")
		except EOFError:
			break
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    H, W, K = map(int, input().split())
    S = [input() for _ in range(H)]

    ans = 10 ** 9

    for bit in range(1 << (H-1)):
        canSolve = True
        ord = [0] * (H + 1)
        N = 0
        for i in range(H):
            if bit & 1 << i:
                ord[i+1] = ord[i] + 1
                N += 1
            else:
                print(i)
                ord[i+1] = ord[i]
        nums = [0] * N
        for w in range(W):
            one = [0] * N
            overK = False
            for h in range(H):
                one[ord[h]] += int(S[h][w])
                nums[ord[h]] += int(S[h][w])
                if one[ord[h]] > K:
                    canSolve = False
                if nums[ord[h]] > K:
                    overK = True
            if not canSolve:
                break
            if overK:
                N += 1
                nums = one
        if canSolve and ans > N:
            ans = N
    print(ans)

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
from collections import defaultdict
def input(): return sys.stdin.readline().rstrip()

def main():
    H, W, K = map(int, input().split())
    S = [input() for _ in range(H)]

    ans = 10 ** 9

    for bit in range(1 << (H-1)):
        canSolve = True
        ord = defaultdict(int)
        N = 0
        for i in range(H):
            if bit & 1 << i:
                ord[i+1] = ord[i] + 1
                N += 1
            else:
                ord[i+1] = ord[i]
        add = 0
        nums = defaultdict(int)
        for w in range(W):
            one = defaultdict(int)
            ok = True
            for h in range(H):
                one[ord[h]] += int(S[h][w])
                nums[ord[h]] += int(S[h][w])
                if one[ord[h]] > K:
                    canSolve = False
                if nums[ord[h]] > K:
                    ok = False
            if not ok:
                add += 1
                nums = one
        if canSolve and ans > N + add:
            ans = N + add
    print(ans)

if __name__ == '__main__':
    main()
N = int(input())
flg = True
#start
now,posx,posy=0,0,0
while flg:
  t,x,y=map(int,input().split())
  if abs(x-posx)+abs(y-posy) > (t-now):
    flg = false
    print('No')
  elif (t-now)%2==0 and ((abs(x-posx)+abs(y-posy))%2 ==1):
    flg =false
    print('No')
  elif (t-now)%2==1 and ((abs(x-posx)+abs(y-posy))%2 ==0):
    flg =false
    print('No')
  else:
    now = n
    posx = x
    posy = y
if flg:
  print('Yes')

### FIXED CODE ###

N = int(input())
flg = True
cnt,now,posx,posy=0,0,0,0
while cnt < N and flg:
  t,x,y=map(int,input().split())
  if abs(x-posx)+abs(y-posy) > (t-now):
    flg = False
    print('No')
  elif (t-now)%2==0 and ((abs(x-posx)+abs(y-posy))%2 ==1):
    flg =False
    print('No')
  elif (t-now)%2==1 and ((abs(x-posx)+abs(y-posy))%2 ==0):
    flg =False
    print('No')
  else:
    now = t
    posx = x
    posy = y
    cnt += 1
if flg:
  print('Yes')
import math
A, B = map(int,input().split())
for i in range(1000):
    if math.floor(i * 0.08) == A:
        result = i
        break
if math.floor(result * 0.1) == B:
    print(result)
else:
    print(-1)


### FIXED CODE ###

import math
A, B = map(int,input().split())
for i in range(10000):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        print(i)
        break
    elif i == 9999:
        print(-1)
s = input()
q = int(input())
a = [s]

for i in range(q):
    so = input()
    if so == '1':
        a[0], a[-1] = a[-1], a[0]
    else:
        d, f, c = so.split()
        if f == '1':
            a.insert(0, c)
        else:
            a.append(c)


print(''.join(a))


### FIXED CODE ###

s = input()
a = [str(i) for i in s]

if a[0] == a[1] and a[1] == a[2] and a[2] == a[0]:
    print('No')
else:
    print('Yes')
N,A = input().split()

if int(N/500) >=1 and int(N%500) =< A:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

N = int(input())
A = int(input())

if N%500 <= A:
  print("Yes")
else:
  print("No")
#D
#　モジュール
import numpy as np
#入力
N,K=map(int,input().split())
P=list(map(int,input().split()))

#処理
#内部関数
def d_1(x):
    t=0
    for i in range(1,x+1):
        t+=i/x
        
    return t

P=np.array([ d_1(i) for i in P])#出る目を期待値に変換
S=np.zeros(K)
for i in range(K):
    S=S+P[i:i+K]
print(np.max(S))
        

### FIXED CODE ###

#D
#モジュール
import numpy as np

#入力
N,K=map(int,input().split())
P=np.array(list(map(int,input().split())))

#諸関数
def pront(X):
    #デバッグ用プリント
    #環境変数としてdebugを確保して、それが1なら内容を出力
    if debug==0:
        print(X)

#デバッグ用
debug=1#0:本番,1:デバッグ中



#処理
pront(P)
#関数
def d_1(p):
    #1~pまででるサイコロの期待値を返す
    return((p+1)/2)
#ここまで

P=list(d_1(P))

pront(P)

X=[0]
for i in range(N):
    if i==0:
        X.append(P[i])
    else:
        X.append(P[i]+X[-1])
result=-1
pront(X)
for i in range(N-K+1):
    cal=X[i+K]-X[i]
    if result<cal:
        result=cal
print(result)
n,m=map(int,input().split())
count=[0]*m
ans=0
list=[]
for i in range(n):
  list.append(list(map(int,input().split())))
  for j in range(1,list[i][0]+1):
    count[list[i][j]-1]+=1
for i in range(m):
  if count[i]==n:
    ans+=1
print(ans)

### FIXED CODE ###

n,m=map(int,input().split())
count=[0]*m
ans=0
arr=[]
for i in range(n):
  arr.append(list(map(int,input().split())))
  for j in range(1,arr[i][0]+1):
    count[arr[i][j]-1]+=1
for i in range(m):
  if count[i]==n:
    ans+=1
print(ans)
# -*- coding: utf-8 -*-
import math

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

num = 0
for i in range(N/2):
    if ai[i + 1] % 2 == 1:
        num += 1

print(num)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import math

N = int(input())
# print(N)
ai = input().split(' ')
# print(ai)
num = 0
for i in range(N):
    if i % 2 == 0:
        if int(ai[i]) % 2 == 1:
            # print('asd' + str(i))
            # print('hoge' + str(ai[i*2]))
            num += 1

print(num)
, b = map(int, input().split())

i = 0
s = 0

for i in range(1, b - a):
    s += i
print(s - a)

### FIXED CODE ###

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

i = 0
s = 0

for i in range(1, b - a):
    s += i
print(s - a)
N, X = map(int, input().split())
L = list(map(int, input().split()))

D = 0
res = 0
while True:
    if D > X:
        break
    res += 1
    D += L[res-1] 

print(res)

### FIXED CODE ###

N, X = map(int, input().split())
L = list(map(int, input().split()))

D = 0
cnt = 1
for i in range(N):
    D+=L[i]
    if D>X:
        break
    else:
        cnt += 1
print(cnt)
n,m = list(map(int,input().split))
if 0 < n < 10 and 0 < m < 10 :
  print(n*m)
else :
  print(-1)
  

### FIXED CODE ###

n,m = list(map(int,input().split()))
if 0 < n < 10 and 0 < m < 10 :
  print(n*m)
else :
  print(-1)
import math

n,x = [int(i) for i in input().split()]

lis = list(map(int,input().split()))
diffs = []
for i in range(n):
    diff = abs(lis[i]-x)
    if diff != 0:
        diffs.append(diff)


if len(diffs) > 1:
    com = math.gcd(diffs[0],diffs[1])
    for i in range(n-2):
        com = math.gcd(com, diffs[i+2])
else:
    com = diffs[0]

print(com)

### FIXED CODE ###

import fractions

n,x = [int(i) for i in input().split()]

lis = list(map(int,input().split()))
diffs = []
for i in range(n):
    diff = abs(lis[i]-x)
    diffs.append(diff)


if len(diffs) > 1:
    com = fractions.gcd(diffs[0],diffs[1])
    for i in range(len(diffs)-2):
        com = fractions.gcd(com, diffs[i+2])
else:
    com = diffs[0]

print(com)
N,Q = map(int,input().split())
s = input()
q = [[0,0] for i in range(Q)]
for i in range(Q):
    q[i] = input().split()
    
def L(n):
    pos = n
    for i in range(Q):
        t,d = q[i]
        if s[pos] == t:
            if d == 'L':
                pos -= 1
            elif d == 'R':
                pos += 1
            if pos == -1:
                return True
    return False

def R(n):
    pos = n
    for i in range(Q):
        t,d = q[i]
        if s[pos] == t:
            if d == 'L':
                pos -= 1
            elif d == 'R':
                pos += 1
            if pos == N:
                return True
    return False

n_mid = N//2-1
n_l = 0
n_r = N-1
for i in range(25):
    if L(n_mid):
        n_l = n_mid
        n_mid = (n_l+n_r)//2
    else:
        n_r = n_mid
        n_mid = (n_l+n_r)//2

if not L(n_l):
    l = -1
elif L(n_r):
    l = n_r
else:
    l = n_l

n_mid = N//2-1
n_l = 0
n_r = N-1
for i in range(25):
    if R(n_mid):
        n_r = n_mid
        n_mid = (n_l+n_r)//2
    else:
        n_l = n_mid
        n_mid = (n_l+n_r)//2

if not R(n_r):
    r = N
elif R(n_l):
    r = n_l
else:
    r = n_r

ans = 0
for i in range(N):
    if l < i < r:
        ans += 1
print(ans)

### FIXED CODE ###

N,Q = map(int,input().split())
s = input()
q = [[0,0] for i in range(Q)]
for i in range(Q):
    q[i] = input().split()
    
def L(n):
    pos = n
    for i in range(Q):
        t,d = q[i]
        if s[pos] == t:
            if d == 'L':
                pos -= 1
            elif d == 'R':
                pos += 1
            if pos == -1:
                return True
            if pos == N:
                return False
    return False

def R(n):
    pos = n
    for i in range(Q):
        t,d = q[i]
        if s[pos] == t:
            if d == 'L':
                pos -= 1
            elif d == 'R':
                pos += 1
            if pos == N:
                return True
            if pos == -1:
                return False
    return False

n_mid = N//2
n_l = 0
n_r = N-1
for i in range(25):
    if L(n_mid):
        n_l = n_mid
        n_mid = (n_l+n_r)//2
    else:
        n_r = n_mid
        n_mid = (n_l+n_r)//2

if not L(n_l):
    l = -1
elif L(n_r):
    l = n_r
else:
    l = n_l

n_mid = N//2-1
n_l = 0
n_r = N-1
for i in range(25):
    if R(n_mid):
        n_r = n_mid
        n_mid = (n_l+n_r)//2
    else:
        n_l = n_mid
        n_mid = (n_l+n_r)//2

if not R(n_r):
    r = N
elif R(n_l):
    r = n_l
else:
    r = n_r

ans = 0
for i in range(N):
    if l < i < r:
        ans += 1
print(ans)
import sys

args = sys.argv

if args[1] == args[2] and args[2] == args[3]:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

import sys

def main():
	A,B,C = input().split()

	if A == B and B == C:
  		print("Yes")
	else:
  		print("No")

if __name__ == '__main__':
	main()
def gcd(x, y):
    while y != 0:
        x, y = y, x % y
    return x


def prime_factor(n):
    ret, p = [], 2

    while p*p <= n:
        if n % p != 0:
            p += 1
            continue

        exp_v = 0
        while n%p == 0:
            exp += 1
            n //= p
        ret.append( [ret, exp_v] )

        p += 1

    if n != 1: ret.append( [n, 1] )

    return ret


a, b = map(int, input().split())
g = gcd(a, b)

print( len(prime_factor(g)) + 1)

### FIXED CODE ###

def gcd(x, y):
    while y != 0:
        x, y = y, x % y
    return x


def prime_factor(n):
    ret = {}
    p = 2
    while p*p <= n:
        while n % p == 0:
            ret[p] = ret.get(p, 0) + 1
            n //= p
        p += 1

    if n != 1: ret[n] = 1

    return ret


a, b = map(int, input().split())
g = gcd(a, b)

print( len(prime_factor(g)) + 1)
str_S = raw_input()

list_S = list(str_S)

list_str = []
list_number = []

list_S2 = list_S

for char in list_S:
    number = 0
    list_S2.remove(char)

    if char == 'A' or char == 'C' or char == 'T' or char == 'G':
        number += 1
        for n in list_S2:
            if n == 'A' or n == 'C' or n == 'T' or n == 'G':
                char += n
                number += 1
            else:
                list_str.append(char)
                list_number.append(number)
                break
    else:
        list_number.append(0)


print int(max(list_number))


### FIXED CODE ###

# coding: utf-8
str_S = raw_input()

list_S = list(str_S)
list = list(str_S)

list_number = []

while list != []:
    number = 0
    for char in list:
        if char == 'A' or char == 'C' or char == 'G' or char == 'T':
            number += 1
        else:
            break
    list_number.append(number)

    for n in range(number + 1):
        if list != []:
            list.pop(0)

print max(list_number)
a,b,n = map(int, input().split())

t=0
xx=0
l=[0]*b
p=1
if a<b:
   while t == 0 and xx <= n:
      xx += 1
      c=a*xx%b
      if l[c]==0:
         l[c]=xx
      else:
         t=1
   while t>-1:

      if l[p]>0:
         t=-2
         x=l[p]
      p+=1



else:
   x=n
print(a*x//b-a*(x//b))

### FIXED CODE ###


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


if n>=b-1:
    x=b-1
else:
    x=n
print(a*x//b-a*(x//b))
a,b,c,d,e,f = map(int,input().split())
ans_per, ans_w, ans_s = 0,0,0
for i in range(f//(100*a) + 1):
  for j in range(, (f-100*i)//(100*b) + 1):
    w = i*a*100 + j*b*100
    r = min(f-w, w//100 * e)
    for x in range(r//c + 1):
      for y in range((r-x*c)//d + 1):
        s = x*c + y*d
        if s / w > ans_per:
          ans_per = s/w
          ans_w = w
          ans_s = s
print('{} {}'.format(ans_w+ans_s, ans_s))  

### FIXED CODE ###

a,b,c,d,e,f = map(int,input().split())
ans_per, ans_w, ans_s = -1,0,0
for i in range(f//(100*a) + 1):
  for j in range((f-100*i)//(100*b) + 1):
    if i == j == 0:
      continue
    w = i*a*100 + j*b*100
    r = min(f-w, w//100 * e)
    for x in range(r//c + 1):
      for y in range((r-x*c)//d + 1):
        s = x*c + y*d
        if s / w > ans_per:
          ans_per = s/w
          ans_w = w
          ans_s = s
print('{} {}'.format(ans_w+ans_s, ans_s))
a,b,t=list(map(int,input()))
print(t*b(//a))


### FIXED CODE ###

a,b,t=list(map(int,input().split()))
print((t//a)*b)
x = input()
y = x**3
print(y)

### FIXED CODE ###

x = int(input())
y = x**3
print(y)
#!/usr/bin/env python3
import sys
import functools
from math import gcd
# from fractions import gcd
 
def solve(N: int, A: "List[int]"):
    L = [0] * (N)
    R = [0] * (N)
 
    L[0] = A[0]
    for i in range(1, N):
        L[i] = gcd(L[i-1], A[i-1])
 
    R[N-1] = A[N-1]
    for i in reversed(range(0,N-1)):
        R[i] = gcd(R[i+1], A[i+1])
 
    # print(L)
    # print(R)
 
    ans = 0
    for i in range(N):
        ans = max(ans, gcd(L[i], R[i]))
 
    print(ans)
 
    return
 
 
# Generated by 1.1.4 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
    A = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, A)
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin/env python3
import sys
import functools
# from math import gcd
# from fractions import gcd

def gcd(x,y):
    if x<y:
        x,y=y,x
    #x>y
    if y==0:
        return x
    if x%y==0:
        return y
    else:
        return gcd(y,x%y)
 
def solve(N: int, A: "List[int]"):
    L = [0] * (N)
    R = [0] * (N)
 
    for i in range(1, N):
        L[i] = gcd(L[i-1], A[i-1])
    for i in reversed(range(0,N-1)):
        R[i] = gcd(R[i+1], A[i+1])
 
    # print(L)
    # print(R)
 
    ans = 0
    for i in range(N):
        ans = max(ans, gcd(L[i], R[i]))
 
    print(ans)
 
    return
 
 
# Generated by 1.1.4 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
    A = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, A)
 
if __name__ == '__main__':
    main()
n, q = map(int, input().split())
g = [list() for i in range(n)]
node = [0]*n

for i in range(n-1):
    a, b = map(int, input().split())
    a -= 1; b -= 1
    g[a].append(b)
    g[b].append(a)

for i in range(q):
    p, x = map(int, input().split())
    node[p-1] += x

def dfs(v, p=-1):
    for u in g[v]:
        if u == p:
            continue
        node[u] += node[v]
        dfs(u, v)

dfs(0)
print(*node)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

n, q = map(int, input().split())
g = [list() for i in range(n)]
node = [0] * n

for i in range(n-1):
    a, b = map(int, input().split())
    a -= 1; b -= 1
    g[a].append(b)
    g[b].append(a)

for i in range(q):
    p, x = map(int, input().split())
    node[p-1] += x

def dfs(v, p=-1):
    for u in g[v]:
        if u == p: continue
        node[u] += node[v]
        dfs(u, v)

dfs(0)
print(*node)
a = int(input())
b = int(input())
print(max([a+b, a-b, a*b]))

### FIXED CODE ###

a = int(input())
s = input()
print(s if a >= 3200 else 'red')