Harryxun/stf_run huggingface dataset:
j = [2,3,4,5,6,7,8,9,10,11,12,13,1]
a,b = [int(x) for x in input().split()]
if j.index(a) > j.rindex(b):
  print('Alice')
elif j.rindex(a) < j.rindex(b):
  print('Bob')
else:
  print('Draw')


### FIXED CODE ###

a,b = [int(x) for x in input().split()]
j = [2,3,4,5,6,7,8,9,10,11,12,13,1]
if j.index(a) > j.index(b):
  print('Alice')
elif j.index(a) < j.index(b):
  print('Bob')
else:
  print('Draw')
k,x = map(int,input().split())
if(k*500 >=x)
	input('Yes')
else:
  input('No')

### FIXED CODE ###

k,x = map(int,input().split())
if k*500 >=x:
	print('Yes')
else:
  print('No')
H,W,N = map(int, input().split())
sr,sc = map(int, input().split())
S = input()
T = input()

left, right = 0, W+1
if S[-1] == "R":
    right -= 1
elif S[-1] == "L":
    left += 1
for i in reversed(range(N-1)):
    si, ti = S[i], T[i]
    if ti == "R":
        left -= 1
    elif ti == "L":
        right += 1
    left = max(0, left)
    right = min(W+1, right)

    if si == "R":
        right -= 1
    elif si == "L":
        left += 1

    if right - left == 1:
        print("NO")
        exit()

if sc <= left or right <= sc:
    print("NO")
    exit()


left, right = 0, H+1
if S[-1] == "U":
    left += 1
elif S[-1] == "D":
    right -= 1

for i in reversed(range(N-1)):
    si, ti = S[i], T[i]
    if ti == "D":
        left -= 1
    elif ti == "U":
        right += 1
    down = max(0, down)
    up = min(H+1, up)

    if si == "D":
        right -= 1
    elif si == "":
        left += 1

    if right - left == 1:
        print("NO")
        exit()

if sr <= left or right <= sr:
    print("NO")
    exit()

print("YES")


### FIXED CODE ###

H,W,N = map(int, input().split())
r,c = map(int, input().split())
S = input()
T = input()

y,x = r,c
# Taka: R, Aoki: L
for si,ti in zip(S,T):
    if si == "R":
        x += 1
    if x > W:
        print("NO")
        exit()
    if ti == "L" and x > 1:
        x -= 1

y,x = r,c
# Taka: L, Aoki: R
for si,ti in zip(S,T):
    if si == "L":
        x -= 1
    if x < 1:
        print("NO")
        exit()
    if ti == "R" and x < W:
        x += 1

y,x = r,c
# Taka: U, Aoki: D
for si,ti in zip(S,T):
    if si == "U":
        y -= 1
    if y < 1:
        print("NO")
        exit()
    if ti == "D" and y < H:
        y += 1

y,x = r,c
# Taka: U, Aoki: D
for si,ti in zip(S,T):
    if si == "D":
        y += 1
    if y > H:
        print("NO")
        exit()
    if ti == "U" and y > 1:
        y -= 1

print("YES")
second=input()
first=splitlines(second)
P=first[0]
S=first[1]
count=0
for t in range(0,len(P)-1):
  if P[t] is S[t]:count=count+1
    else:
      count=count
print(int(count))

### FIXED CODE ###

a=[input() for i in range(2)]
P=a[0]
S=a[1]
count=0
for t in range(len(P)):
  if P[t] != S[t]:
    count=count+1
print(count)
from math import log10

n = int(input())
ans = log10(n) + log10(n-1) - log10(2)
print(round(10**ans))

### FIXED CODE ###

N = int(input())
print(N * (N - 1) // 2)
import math
x,y=input().split()
x=int(x)
y=int(y)

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

print(lcm(x, y))

### FIXED CODE ###

a,b=input().split()
a=int(a)
b=int(b)
x = a * b

if (a<b):
  tmp = a
  a = b;
  b = tmp

r = a % b
while(r!=0):
  a = b
  b = r
  r = a % b

print(int(x/b))
A, B, K = [int(i) for i in input().split()]
th = []
i = 1
while True:
    i += 1
    if (A % i, B % i) == (0, 0):
        th.append(i)
    if i > A or i > B:
        break
print(th[len(th) - K])


### FIXED CODE ###

A, B, K = [int(i) for i in input().split()]
th = []
i = 0
while True:
    i += 1
    if (A % i, B % i) == (0, 0):
        th.append(i)
    if i > A or i > B:
        break
print(th[len(th) - K])
import sys

n, y = list(map(int, sys.stdin.readline().strip().split(" ")))

t_list = []

for i in range(n + 1):
    for j in range(n-i+1):
        t_list.append(N-i-j, j, i)

for a, b, c in t_list:
    if 10000 * a + 5000 * b + 1000 * c == y:
        print(" ".join([str(a), str(b), str(c)]))
        sys.exit()

print("-1 -1 -1")


### FIXED CODE ###

import sys

n, y = list(map(int, sys.stdin.readline().strip().split(" ")))

t_list = []

for a in range(n + 1):
    for b in range(n-a+1):
        #t_list.append((n-i-j, j, i))
        c = n-a-b
        if 10000 * a + 5000 * b + 1000 * c == y:
            print(" ".join([str(a), str(b), str(c)]))
            sys.exit()

print("-1 -1 -1")
import numpy as np
n= int(input())
xy = [list(map(int,input().split())) for _ in range(n)]
x = np.array([hs[i][0] for i in range(n)])
y = np.array([hs[i][1] for i in range(n)])

eps = 10**(-7)
while rx-lx>eps and ry-ly>eps:
    midx=(rx+lx)/2
    midy=(ry+ly)/2
    
    radius_mid_mid=(((x-midx)**2+(y-midy)**2)**0.5).max()
    radius_r_mid=(((x-rx)**2+(y-midy)**2)**0.5).max()
    radius_mid_r=(((x-midx)**2+(y-ry)**2)**0.5).max()
    radius_r_r=(((x-rx)**2+(y-ry)**2)**0.5).max() 
    r_max=min(radius_mid_mid, radius_mid_r, radius_r_mid, radius_r_r)
    if r_max==radius_r_r:
        lx=midx/2
        ly=midy/2
    elif r_max==radius_mid_r:
        rx=midx*1.5
        ly=midy/2 
    elif r_max==radius_r_mid:
        lx=midx/2
        ry=midx*1.5
    else:
        rx=midx*1.5
        ry=midy*1.5    
print((((x-rx)**2+(y-midy)**2)**0.5).max())

### FIXED CODE ###

from math import sqrt 
n= int(input())
xy=[[int(i) for i in input().split()] for _ in range(n)]
def d(x, y):
    return sqrt((x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2)
def nai(x, y, z):
    c,b,a = sorted([d(x, y), d(y, z), d(z, x)])
    co = (b**2 + c**2 - a**2)/(2*b*c)
    if co<0: return a/2
    si = sqrt(1-co**2)
    return a/si/2

if n==2:
    print(d(xy[0],xy[1])/2)
else:
    ans=0
    for i in range(n):
        for j in range(i+1, n):
            for k in range(j+1, n):
                ans = max(ans,nai(xy[i],xy[j],xy[k]))
    print(ans)
# -*- coding: utf-8 -*-
n = int(input())
s = input()
k = int(input())

selected = s[k]
print(''.join(['*' if l != selected else l for l in s ]))

### FIXED CODE ###

# -*- coding: utf-8 -*-
n = int(input())
s = input()
k = int(input())

selected = s[k - 1]
print(''.join(['*' if l != selected else l for l in s ]))
S = input()

if S[2]==S[3]andS[4]==S[5]:
    print("Yes")
else:
    print("No")
    

### FIXED CODE ###

S = input()

if S[2]==S[3] and S[4]==S[5]:
    print("Yes")
else:
    print("No")
s = input()
t = input()
len_s = len(s)
len_t = len(t)
dp = [[0]*(len_t+1) for _ in range(len_s+1)]
# dp[i][j]はs[i],t[j]までで、最長の部分列の長さ
for i in range(len_s):
    for j in range(len_t):
        if s[i] == t[i]:
            dp[i+1][j+1] = max(dp[i][j]+1, dp[i+1][j], dp[i][j+1])
        else:
            dp[i+1][i+1] = max(dp[i+1][j], dp[i][j+1])
#print(dp)
ans = ""
while len_t>0 and len_s>0:
    if dp[len_s][len_t] == dp[len_s-1][len_t]:
        len_s -= 1
    elif dp[len_s][len_t] == dp[len_s][len_t-1]:
        len_t -= 1
    else:
        ans += s[len_s-1]
        len_s -= 1
        len_t -= 1
print(ans[::-1])

### FIXED CODE ###

s = input()
t = input()
len_s = len(s)
len_t = len(t)
dp = [[0]*(len_t+1) for _ in range(len_s+1)]
# dp[i][j]はi、j文字目までのs[i],t[j]で、最長の部分列の長さ
for i in range(len_s):
    for j in range(len_t):
        if s[i] == t[j]:
            dp[i+1][j+1] = max(dp[i][j]+1, dp[i+1][j], dp[i][j+1])

        dp[i+1][j+1] = max(dp[i+1][j+1], dp[i+1][j], dp[i][j+1])
#print(dp)
ans = ""
while len_t > 0 and len_s > 0:
    if dp[len_s][len_t] == dp[len_s-1][len_t]:
        len_s -= 1
    elif dp[len_s][len_t] == dp[len_s][len_t-1]:
        len_t -= 1
    else:
        ans += s[len_s-1]
        len_s -= 1
        len_t -= 1
print(ans[::-1])
import numpy as np
N = int(input())
a = np.array(list(map(int,input().split())))
set = set(list)

for i in set:
    c = list.count(i)
    if c >i:
        cnt += c-i
    elif c <i:
        cnt += c
print(N - len(list)+cnt)

### FIXED CODE ###

N=int(input())
list=list(map(int,input().split()))
while len(list) != 0and max(list) > len(list):
    list = [i for i in list if i < len(list)]
#list2 = [i for i in list if i < N]
set = set(list)
cnt=0
for i in set:
    c=list.count(i)
    if c > i:
        cnt +=c-i
    elif c < i:
        cnt +=c
print(N-len(list)+cnt)

##できなかった．
N = int(input())
graph = [[] for _ in range(N)]
for _ in range(N-1):
  u, v, w = map(int, input().split())
  u -= 1
  v -= 1
  graph[u] += [[v, w]]
  graph[v] += [[u, w]]

color = [-1]*N 
def dfs(v, c):
  color[v] = c
  for next_v, w in graph[v]:
    if color[next_v] == c and w % 2 != 0:
      return False
    if color[next_v] == -1 and w % 2 == 0 and dfs(next_v, c) == False:
      return False
    if color[next_v] == -1 and w % 2 != 0 and dfs(next_v, abs(1-c)) == False:
      return False
  return True

dfs(0, 0)
for c in color:
  print(c)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

global color 
global adlist
color = [0 for _ in range(100001)] 

def make_adlist(N, uvw):
  global adlist
  adlist = [[] for _ in range(N)]
  for u, v, w in uvw:
    adlist[u-1] += [[v-1, w%2]]
    adlist[v-1] += [[u-1, w%2]]
  return adlist 

def dfs(v, c):
  global color
  global adlist
  color[v] = c
  for next_v, w in adlist[v]:
    if color[next_v] != 0:
      continue
    if color[next_v] == 0 and w % 2 != 0:
      dfs(next_v, -c)
    elif color[next_v] == 0 and w % 2 == 0:
      dfs(next_v, c)

  return 


def main():
  N = int(input())
  uvw = [list(map(int, input().split())) for _ in range(N-1)]
  adlist = make_adlist(N, uvw)
  dfs(0, 1)
  for c in color[:N]:
    if c == 1:
      print(1)
    else:
      print(0)


if __name__ == "__main__":
  main()
ai = lambda: list(map(int,input().split()))
ai_ = lambda: [int(x)-1 for x in input().split()]

mod = 10**9+7


def nCb(n, b):
    if b > n - b:
        b = n - b
    r = 1
    for k in range(n, n-b, -1):
        r = r * k % mod
    d = 1
    for k in range(1, b+1):
        d = d * k % mod
    return r * inv(d) % mod


def inv(x):
    return pow(x, mod - 2, mod)


h,w,a,b = ai()
aa = h-a-1
bb = w-b-1
c1 = nCb(aa+b, b)
c2 = nCb(a+bb-1, bb)
ans = c1 * c2
ans %= mod

for i in range(1, bb+1):
    c1 = c1 * (aa + b + i) * inv(b + i) % mod
    c2 = c2 * (bb - i + 1) * inv(a + bb - i) % mod
    ans += c1 * c2
    ans %= mod
print(ans)


### FIXED CODE ###

N,k = list(map(int,input().split()))
d = list(map(int, input().split()))

while True:
    m = list(str(N))
    f = 0
    for i in d:
        if str(i) in m:
            f += 1
    if f == 0:
        print(N)
        break
    N += 1
s=input()
X,Y=map(int,input().split())
def solve(a,G):
    dp=[[0]*20 for _ in range(len(x))]
    dp[0][a[0]]=1

    for i in range(1,len(a)):

        for j in range(-9,9):
            dp[i][j-a[i]]+=dp[i-1][j]
            dp[i][j+a[i]]+=dp[i-1][j]
            #print(dp)
    for i in range(len(a)):
        if dp[i][G]>=1:
            return True
    return False

x=[]
y=[0]
flg=1
cnt=0
if s[0]=="T":
    x.append(0)
for i in range(len(s)):
    if s[i]=="F":
        cnt+=1
    else:
        if flg==1:
            x.append(cnt)
            flg*= -1
            cnt=0
        else:
            y.append(cnt)
            flg*= -1
            cnt=0
if flg==1:
    x.append(cnt)
else:
    y.append(cnt)
#print(x)
#print(y)
if not solve(y,Y):
    print("a")
if solve(x,X) and solve(y,Y):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

s=input()
X,Y=map(int,input().split())
from collections import defaultdict
def solve(da,dp,G):
    for i in range(len(da)):
        tmp=set()
        for j in dp:
            tmp.add(j-da[i])
            tmp.add(j+da[i])
        dp=tmp
    if G in dp:
        return True
    else:
        return False
    """amax=0
    for i in a:
        amax+=abs(i)
    if amax==0:
        if G==0:
            return True
        else:
            return False
    if a[0]==G:
        return True
    dp=[[0]*2*amax for _ in range(3)]
    dp[0][a[0]]=1
    for i in range(1,len(a)):
        p=a[i]
        for j in range(-amax,amax):
            dp[i%3][j-p]+=dp[(i-1)%3][j]
            dp[i%3][j+p]+=dp[(i-1)%3][j]
            #print(dp)
        if dp[i%3][G]>=1:
            return True
    return False"""
    """#print(a)
    dp=set()
    dp.add(a[0])
    dp2=set()
    for i in range(1,len(a)):
        for j in dp:
            dp2.add(j-a[i])
            dp2.add(j+a[i])
        dp=copy.deepcopy(dp2)
    #print(dp)
    if G in dp:
        return True
    return False"""

d=[len(x) for x in s.split("T")]

dx=d[2::2]
dy=d[1::2]

if solve(dx,{d[0]},X) and solve(dy,{0},Y):
    print("Yes")
else:
    print("No")
import sys
input = sys.stdin.readline

class RangeUpdateQuery:
    def __init__(self, n):
        self.n0 = 2**(n-1).bit_length()
        self.INF = 10 ** 18
        self.data = [self.INF]*(2*self.n0-1)

    def update(self, l,r,v):
        l += self.n0
        r += self.n0
        while l < r:
            if r&1:
                r -= 1
                if self.data[r-1] > v:
                    self.data[r-1] = v
            if l&1:
                if self.data[l-1] > v:
                    self.data[l-1] = v
                l += 1
            l >>=1
            r >>=1

    def query(self, i):
        i += self.n0-1
        res = self.INF
        while i+1:
            if self.data[i] < res:
                res = self.data[i]
            i = ~-i//2
        return res

n,m = map(int, input().split())
light = [list(map(int, input().split())) for i in range(m)]
light.sort()
RUQ = RangeUpdateQuery(n-1)
RUQ.update(0,1,0)
for a,b,c in light:
    cur = RUQ.query(a-1)
    RUQ.update(a, b, cur+c)

ans = RUQ.query(n-1)
if ans >= 10 ** 18:
  print(-1)
else:
  print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline

import heapq
N,M = map(int,input().split())
LRC = [tuple(map(int,input().split())) for i in range(M)]

es = [[] for i in range(N)]
for l,r,c in LRC:
    l,r = l-1,r-1
    es[l].append((r,c))
for i in range(N-1):
    es[i+1].append((i,0))

INF = 10 ** 18
dist = [INF]*N
dist[0] = 0
hq = [(0,0)]
heapq.heapify(hq)

while(hq):
    d,v = heapq.heappop(hq)
    if v==N-1:
        print(d)
        exit()
    for to,c in es[v]:
        if d+c >= dist[to]: continue
        dist[to] = d+c
        heapq.heappush(hq, (d+c, to))
print(-1)
N,M = map(int,input().split())
SC = [list(map(int, input().split())) for i in range(M)]
l = []
first = []
second = []
third = []
for s,c in SC:
  if s == 1:
    first.append(c)
  elif s == 2:
    second.append(c)
  elif s == 3:
    third.append(c)
if first == []:
  print(-1)
elif second == []:
  second.append(0)
elif third == []:
  third.append(0)
l.append(min(first))
l.append(min(second))
l.append(min(third))
l = ''.join(str(n) for n in l)
print(l)


### FIXED CODE ###

N,M = map(int,input().split())
sc=[list(map(int,input().split()))for _ in range(M)]
ans = -1
for i in range(1000):
  s = str(i)
  if len(s) == N:
    flg = 0
    for a,b in sc:
      if int(s[a-1]) != b:
        flg = 1
    if flg == 0:
      ans = i
      break
print(ans)
n,k,q = [int(x) for x in input().split()]
li = []
score = [k]*n
for i in range(q):
    a = int(input())
    li.append(a)
    score = [x-1 for x in score]
    score[pe-1] = score[pe-1]+1
result = []
for i in range(len(score)):
    if score[i]>0:
        print('Yes')
    else:
        print('No')
        


### FIXED CODE ###

n,k,q = [int(x) for x in input().split()]
li = []
for i in range(q):
    a = int(input())
    li.append(a)
score = [k] * (n + 1)
temp =[0]*(n+2)
for pe in li:
    temp[1] += (-1)
    temp[pe] -= (-1)
    temp[pe + 1] += (-1)
    temp[n + 1] -= (-1)

for i in range(1,n + 2):
    temp[i] += temp[i - 1]
#print(temp)
for i in range(1,n + 1):
    score[i] += temp[i]
    if(score[i] <= 0):
        print('No')
    else:
        print('Yes')
N, M = list(map(int, input().split()))
S = input()
T = input()

from fractions import gcd
L = (N * M) // gcd(N, M)

L1 = [1]
L2 = [1]
for i in range(1, N):
    t = i * (L // N) + 1
    L1.append(t)

for i in range(1, M):
    t = i * (L // M) + 1
    L2.append(t)

LS = [None] * L
for i, li in enumerate(L1):
    ind = li-1
    LS[ind] = S[i]

ans = True
for i, li in enumerate(L2):
    ind = li-1
    if LS[ind] is not None:
        if LS[ind] != T[i]:
            ans = False

if ans:
    print(L)
else:
    print(-1)


# print(L1)
# print(L2)
# print(LS)

### FIXED CODE ###

from fractions import gcd

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

L = (N * M) // gcd(N, M)

L1 = [0]
L2 = [0]

from collections import Counter
c = Counter()

for i in range(1, N):
    t = i * (L // N) + 1
    L1.append(t-1)

for i in range(1, M):
    t = i * (L // M) + 1
    L2.append(t-1)


d = {}
for i, li in enumerate(L1):
    d[li] = S[i]

# print(d)

ans = True

for i, li in enumerate(L2):
    if not d.get(li):
        continue
    if d[li] != T[i]:
        ans = False

# print(L1)
# print(L2)
# print(common)
# print(dic)

if ans:
    print(L)
else:
    print(-1)
from scipy.sparse.csgraph import dijkstra
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

graph = [[0]*(n+1) for _ in range(n+1)]
for a, b in ab:
    graph[a][b] = 1

ans = 0
inf = 10**9

for a, b in ab:
    graph[a][b] = inf
    dist = dijkstra(graph, indices = a, directed = False)
    if dist[b] >= inf:
        ans += 1
    graph[a][b] = 1

print(ans)


### FIXED CODE ###

n,m=map(int, input().split())
ab=[list(map(int, input().split())) for _ in range(m)]

from collections import deque

def bfs(u):
    queue = deque([u])
    d = [None] * n # uからの距離の初期化
    d[u] = 0 # 自分との距離は0
    while queue:
        v = queue.popleft()
        for i in graph[v]:
            if d[i] is None:
                d[i] = d[v] + 1
                queue.append(i)
    flag=True
    for _i in range(n):
        if d[_i]==None:
            flag=False
    return flag

cnt=0
for i in range(m):
    graph = [[] for _ in range(n)]
    for j in range(m):
        if i!=j:
            graph[ab[j][0]-1].append(ab[j][1]-1)
            graph[ab[j][1]-1].append(ab[j][0]-1)
    if not bfs(0):
        cnt+=1
print(cnt)
n,a=map(int,input().split('/n'))
print((n**2) -a )

### FIXED CODE ###

N = int(input())
A = int(input())
print(N**2-A)
N = int(input())
H = list(map(int, input().split()))

if H[1] == H[0] + 1:
    print("Yes")
 
elif H[0] - 1 == H[1]:
    print("Yes")
    
else:
    print("No")


### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
H[0] -= 1
count = 0
for i in range(1, N):
    if H[i] > H[i - 1]:
        H[i] -= 1 

for i in range(1, N):
    if H[i] <H[i - 1]:
        print("No")
        exit()
print("Yes")
from decimal import Decimal
a ,b ,c = map(int,input().split())
ra = (Decimal.sqrt(a))
rb = (Decimal.sqrt(b))
rc = (Decimal.sqrt(c))
if ra + rb < rc:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

a ,b ,c = map(int,input().split())
#4*a*b < (c-a-b)**2　両辺を２乗することを思いつかなかった。
if 4*a*b < (c-a-b)**2 and (c-a-b) > 0:
    print("Yes")
else:
    print("No")
import numpy as np
s=input()
k=int(input())
cnt=1
a=[]
ss=s+"."
for i in range(len(s)):
    if ss[i]==ss[i+1]:
        cnt+=1
    else:
        a.append(cnt)
        cnt=1

pp=0
if s[0]==s[len(s)-1]:
    pp=a[0]+a[-1]
    
    b=[]
    if len(a)>1:
        b.append(pp)
        b+=a[1:len(a)-1]

    else:
        a=[len(s)*k]
        b=[]

arr=np.array(a)
arr2=np.array(b)

a=arr//2
b=arr2//2
if len(s)>=2:
    print(np.sum(a)+int((k-1)*np.sum(b)))
else:
    print(k//2)

### FIXED CODE ###

import numpy as np
s=input()
k=int(input())
cnt=1
a=[]
ss=s+"."
for i in range(len(s)):
    if ss[i]==ss[i+1]:
        cnt+=1
    else:
        a.append(cnt)
        cnt=1

pp=0
if s[0]==s[len(s)-1]:
    pp=a[0]+a[-1]
    
    b=[]
    if len(a)>1:
        b.append(pp)
        b+=a[1:len(a)-1]

    else:
        a=[len(s)*k]
        b=[]

else:
    
    b=a
arr=np.array(a)
arr2=np.array(b)

a=arr//2
b=arr2//2
if len(s)>=2:
    print(np.sum(a)+int((k-1)*np.sum(b)))
else:
    print(k//2)
S = input()
if S[-1] == 's':
  ans += 'es'
else:
  ans += 's'
print(ans)

### FIXED CODE ###

S = input()
if S[-1] == 's':
    ans = S+'es'
else:
    ans = S+'s'
print(ans)
n,t=map(int,input().split())
l=[]
for i in range(n):
    l.append([j for j in map(int,input().split())])
    
a=float('inf')
for i in l:
    if i[1] <= t:a=i[0]
if a == float('inf'):
    a = 'TLE'
print(a)

### FIXED CODE ###

n=int(input())
if n==1:print('Hello World')
else:
    a=int(input())
    b=int(input())
    print(a+b)
a=list(map(int, input().split()))
b=2＊a[3]＊a[2]
c=a[2]＊a[4]＊2+a[0]＊(a[3]-a[4])
d=2＊a[4]＊a[2]
e=a[2]＊a[3]＊2+a[1]＊(a[4]-a[3])
f=a[0]＊a[3]+a[1]＊a[4]
g=min(b,c,f)
h=min(d,e,f)
if a[3]>=a[4]:
    print(g)
else:
    print(h)

### FIXED CODE ###

a, b, c, x, y = map(int, input().split())
res = 0
if a+b > c*2:
    mi = min(x, y)
    res += c*2 * mi
    x -= mi
    y -= mi
res += x * min(a, c*2)
res += y * min(b, c*2)
print(res)
L = int(input)
print((L**3)/27)

### FIXED CODE ###

L = int(input())
print((L**3)/27)
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)

def main():
    N = int(input())

    A = []
    x = []
    y = []

    for i in range(N):
        Ai = int(input())
        xi = []
        yi = []
        A.append(Ai)
        x.append(xi)
        y.append(yi)

        for j in range(Ai):
            xij, yij = map(int, input().split(' '))
            xi.append(xij)
            yi.append(yij)

    logging.info(A)
    logging.info(x)
    logging.info(y)

    ok_list = []
    for bits in range(2 ** N):
        ok_flag = True
        for i in range(N):
            if (bits >> i) & 1 == 0:
                continue

            for j in range(A[i]):
                if (bits >> (x[i][j] - 1) & 1) != y[i][j]:
                    ok_flag = False

    if ok_flag:
        ok_list.append(bin(bits).count('1'))

    print(max(ok_list))

    
if __name__ == "__main__":
    main()


### FIXED CODE ###

import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)

def main():
    N = int(input())

    A = []
    x = []
    y = []

    for i in range(N):
        Ai = int(input())
        xi = []
        yi = []
        A.append(Ai)
        x.append(xi)
        y.append(yi)

        for j in range(Ai):
            xij, yij = map(int, input().split(' '))
            xi.append(xij)
            yi.append(yij)

    logging.info(A)
    logging.info(x)
    logging.info(y)

    ok_list = []
    for bits in range(2 ** N):
        ok_flag = True
        for i in range(N):
            if (bits >> i) & 1 == 0:
                continue

            for j in range(A[i]):
                if (bits >> (x[i][j] - 1) & 1) != y[i][j]:
                    ok_flag = False

        if ok_flag:
            ok_list.append(bin(bits).count('1'))

    print(max(ok_list))

    
if __name__ == "__main__":
    main()
l = int(input())
if l[0] == l[2]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

l = str(input())
if l[0] == l[2]:
    print("Yes")
else:
    print("No")
n,a,b=map(int,input().split())

list_a="a"*a
list_b="b"*b
a_l=int(n/(a+b))
b_l=n%(a+b)
if b_l > a : b_l =a
print(a_l*a+b_l)

### FIXED CODE ###

n,a,b=map(int,input().split())
a_l=n//(a+b)
b_l=n%(a+b)
if b_l > a : b_l = a
print(a_l*a+b_l)