Harryxun/stf_run huggingface dataset:
points = [[False for i in range(5001)] for j in range(5001)]
  ps = []

  for i in range(n):
    x, y = map(int,input().split())
    points[x][y] = True
    ps.append((x,y))

  ans = 0

  for i in range(n):
    for j in range(n):
      p1 = ps[i]
      p2 = ps[j]
      vx = p2[0] - p1[0]
      vy = p2[1] - p1[1]
      p3 = p1[0] + vy, p1[1] - vx
      if points[p1[0] + vy][p1[1] - vx] and points[p2[0] + vy][p2[1] - vx]:
        ans = max(ans, vx ** 2 + vy ** 2)

  print(ans)






### FIXED CODE ###

def main():
  while True:
    n = int(input())
    if not n:
      break
    ps = [tuple(map(int,input().split())) for i in range(n)]
    dic = set()
    for t in ps:
      dic.add(t)
    ans = 0
  
    for i in range(n):
      p1 = ps[i]
      p1x = p1[0]
      p1y = p1[1]
      for j in range(n):
        p2 = ps[j]
        p2x = p2[0]
        p2y = p2[1]
        vx = p2x - p1x
        vy = p2y - p1y
        if (p1x + vy , p1y - vx) in dic and (p2x + vy , p2y - vx) in dic:
          ans = max(ans, vx ** 2 + vy ** 2)
    

    print(ans)
main()
from itertools import *
from collections import *
from bisect import *


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

ruiA=[0 for i in range(N+1)]
for i in range(0,N):
    ruiA[i+1]=ruiA[i]+A[i]


nlst=[]

for i in range(len(ruiA)-1):
    for m in range(i+1,len(ruiA)):
        nlst.append(ruiA[m]-ruiA[i])
nlst.sort(reverse=True)

lenbin=31
for i in range(len(nlst)):
    a=bin(nlst[i])[2:]
    nlst[i]=[0 for i in range(lenbin-len(a))]+list(map(int,list(a)))
    #print(nlst[i])
lenbinst=0

#print(nlst)
use=set([i for i in range(len(nlst))])
while lenbinst<lenbin:
    idx=-1
    count=0
    for m in use:
        if nlst[m][lenbinst]==1:
            count+=1
    if count>=K:
        if len(nlst)!=lenbinst:
            for m in range(len(nlst)):
                if nlst[m][lenbinst]!=1:
                    uselst.remove(m)
    lenbinst+=1
valuelst=[0 for i in range(lenbin)]

for n in nlst:
    for i,a in enumerate(list(reversed(n))):
        if a:
            valuelst[i]+=1

for i in range(lenbin):
    if valuelst[i]>=K:
        newlst=[i for i in nlst if i[idx]==1]
        if len(newlst)>=K:
            nlst=newlst

valuelst=[0 for i in range(lenbin)]
for n in nlst:
    for i,a in enumerate(list(reversed(n))):
        if a:
            valuelst[i]+=1
value=0
for i in range(lenbin):
    if valuelst[i]>=K:
        value+=2**i
print(value)


### FIXED CODE ###

from itertools import *
from collections import *
from bisect import *
N,K=map(int,input().split())
A=list(map(int,input().split()))

ruiA=[0 for i in range(N+1)]
for i in range(0,N):
    ruiA[i+1]=ruiA[i]+A[i]


nlst=[]

for i in range(len(ruiA)-1):
    for m in range(i+1,len(ruiA)):
        nlst.append(ruiA[m]-ruiA[i])
nlst.sort(reverse=True)

lenbin=60
for i in range(len(nlst)):
    lst=[]
    for m in range(lenbin):
        lst.append((nlst[i]>>m)&1)
    nlst[i]=list(reversed(lst))
lenbinst=0

use=set([i for i in range(len(nlst))])
while lenbinst<lenbin:
    idx=-1
    count=0
    dellst=set()
    for m in use:
        if nlst[m][lenbinst]==1:
            count+=1
    if count>=K:
        if len(nlst)!=count:
            for m in use:
                if nlst[m][lenbinst]!=1:
                    dellst.add(m)
    use=use-dellst
    lenbinst+=1
valuelst=[0 for i in range(lenbin)]
nlst=[nlst[i] for i in use]

for n in nlst:
    for i,a in enumerate(list(reversed(n))):
        if a:
            valuelst[i]+=1

for i in range(lenbin):
    if valuelst[i]>=K:
        newlst=[i for i in nlst if i[idx]==1]
        if len(newlst)>=K:
            nlst=newlst

valuelst=[0 for i in range(lenbin)]
for n in nlst:
    for i,a in enumerate(list(reversed(n))):
        if a:
            valuelst[i]+=1
value=0
for i in range(lenbin):
    if valuelst[i]>=K:
        value+=2**i
print(value)
S = input()
from collections import Counter
C = Counter(S)
if len(C.keys()) == 1:
    if C.values()[0] >= 2:
        print("No")
    else:
        print("Yes")
elif len(C.keys()) == 2:
    if sum(C.values()) < 3:
        print("Yes")
    else:
        print("No")
else:
    print("Yes")


### FIXED CODE ###

from collections import Counter
S = input()
Sc = Counter(S)
if len(Sc.keys()) == 1:
    print("YES" if len(S)==1 else "NO")
elif len(Sc.keys()) == 2:
    if (list(Sc.values())[0] != list(Sc.values())[1]) or (list(Sc.values())[0] > 2 or  list(Sc.values())[1] > 2):
        print("NO")
    else:
        print("YES")
else:
    temp = list(Sc.values())
    if max(temp) - min(temp) <= 1:
        print("YES")
    else:
        print("NO")
N = int(input())
A = list(map(int, input().split()))

S = A[0]

for i in range(1, N):
	S = S * A[i]
	if S > 10**18:
         print(-"1")

print(S)

### FIXED CODE ###

def main ():
	N = int(input())
	A = list(map(int,input(). split ()))
	if 0 in A:
		print(0)
		return
	prod = 1
	for a in A:
		prod *= a
		if prod > 1000000000000000000:
			print(-1)
			return
	print(prod)
main ()
while -40<=int(input())<=40: print('yes')
print('no')

### FIXED CODE ###

if 30<=int(input()):
    print('Yes')
else:
    print('No')
# セル3(変数のリセット)
input_count = 0

def func(i, d, marks):
    rooms = numpy.nonzero(d[i])[0]
    new_room = []
    if rooms.size == 0:
        return marks
    for j in rooms:
        room_idx = j
        if room_idx in marks:
            continue
        marks[room_idx] = i
        new_room.append(room_idx)
    for j in new_room:
        marks = func(j, d, marks)
    return marks

import numpy

N, M =  list(map(int, input().split()))
d = numpy.zeros((N,M))
for i in range(M):
    a, b =  list(map(int, input().split()))
    d[a-1, b-1] = 1
    d[b-1, a-1] = 1

marks = func(0, d, {0: 0})

flag = True
output_str = ''
for i in range(1, N):
    if i not in marks:
        flag = False
        break
    output_str += f'{marks[i]+1}\n'
if flag:
    print('Yes')    
    print(output_str)
else:
    print('No')

### FIXED CODE ###


def get_input():
    N, M =  list(map(int, input().split()))
    routes = {}
    for i in range(M):
        a, b =  list(map(int, input().split()))
        a_idx = a - 1
        b_idx = b - 1
        if a_idx in routes:
            routes[a_idx].append(b_idx)
        else:
            routes[a_idx] = [b_idx]
        
        if b_idx in routes:
            routes[b_idx].append(a_idx)
        else:
            routes[b_idx] = [a_idx]

    return N, M, routes

def write_result(marks, N):
    flag = True
    output_str = ''
    for i in range(1, N):
        if i not in marks:
            flag = False
            break
        output_str += f'{marks[i]+1}\n'
    if flag:
        print('Yes')    
        print(output_str)
    else:
        print('No')

import numpy


marks = {0:0}

N, M, routes = get_input()
mark = {0:0}
start_nodes = [0]
while start_nodes:
    next_nodes = []
    for i in start_nodes:
        for n in routes[i]:
            if n in marks:
                continue
            marks[n] = i
            next_nodes.append(n)
    start_nodes = next_nodes   
write_result(marks, N)
h , w = (int(i) for i in input().split())
a =[]
dy = [0, 0, 1, -1]
dx = [1, -1, 0, 0]


for i in range(w):
    a.append(input())
    
f = True
def check(x,y):
    if a[x][y] =='.':
        return True
    for n in range(4):
        i = dx[n]
        j = dy[n]
#        print(a[x+i][y+j])
        if 0 <= x+i < h and 0 <= y + j < w and a[x+i][y+j]=='#':
            #print(x+i,y+j)
            return True
    return False
#print(check(0,3))
f = True
for i in range(w):
    for j in range(h):
        l = check(i,j)
        if not(l) and f:
            print ("No")
            f = False
if(f):
    print("Yes")


### FIXED CODE ###

H ,W = [int(i) for i in input().split(' ')]
s = []
#print(s)
for i in range(H):
    line = input()
    lis = []
    for str in line:
        lis.append(str)
    s.append(lis)


def drawable(h,w):
    for i in [-1,1]:
        if 0 <= w+i < W:
#            print(h,w+i)
            if s[h][w+i] =='#':
                return True
    for i in [-1,1]:
        if 0 <= h+i < H:
            if s[h+i][w] =='#':
                return True

    return False

flag = True
for i in range(H):
    for j in range(W):
#        print(i,j)
        if s[i][j]=='#' and not(drawable(i,j)):
           flag = False 

if flag:
    print("Yes")
else:
    print("No")
A, B = map(int, input().split())

a = 1
count = 0

while True:
  if a >= B:
    print(count)
    exit()
  a = a - 1 + A
  cnt += 1

### FIXED CODE ###

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

if C % (A-1) == 0:
  print(C//(A-1)+1)
elif C % (A-1) != 0 :
  print(C//(A-1)+2)
print(int((int(input()/2))**2))


### FIXED CODE ###

a=int(input())
print((a//2)*((a+1)//2))
s = input()

ans = 0
for i in range(len(s)):
    if s[i] == "+":
        ans += 1ac
    else:
        ans -= 1

print(ans)


### FIXED CODE ###

s = input()

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

print(ans)
a = set([1, 3, 5, 7, 8, 10, 12])
b = set([4, 6, 9, 11])
c = set([2])
xy = list(map(int, input().split()))
if xy in a or xy in b or xy in c:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

a = [0,2,0,1,0,1,0,0,1,0,1,0]
x, y = map(int, input().split())

if a[x-1]==a[y-1]:
    print('Yes')
else:
    print('No')
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>

void cookie(int *p1,int *p2){
	if(*p1 % 2)	--(*p1);
	*p1 /= 2;
	*p2 += *p1;
	return;
}

int main(int argc, char const *argv[])
{	
	int a,b,k;
	scanf("%d%d%d",&a,&b,&k);
	for (int i = 1; i <= k; ++i)
	{
		if(i % 2)	cookie(&a,&b);
		else cookie(&b,&a);
	}
	printf("%d %d\n",a,b);
}

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-

def cookie(p1,p2):
	if p1 % 2 == 1:
		p1 -= 1
	p1 /= 2
	p2 += p1
	return p1,p2

a,b,k = map(int, input().split())
for i in range(k):
	if i % 2 == 0:
		a,b = cookie(a,b)
	else:
		b,a = cookie(b,a)
print("{} {}".format(int(a),int(b)))
n=int(input())
s=[]
d=[(0,0)]

for i in range(1,n+1):
  if n%i==0:
    s.append((i-1,n//i-1))

for i in s:
  d.append(i[0]+i[1])

print(min(d))



    




### FIXED CODE ###

n = int(input())
s=[]
a=0
for i in range(1, int(n ** 0.5) + 1):
    if n % i == 0:
      a=n//i
      s.append(n//i+n//a)
print(min(s)-2)
# Beginners Contest (C)

import sys
sys.setrecursionlimit(10**6)

# 約数に分解
def calc_divisor(n, div_dic = None):
	if n == 1: return div_dic
	# 初回呼び出し時の初期化
	if div_dic is None: div_dic = {}
	for i in range(n):
		# 1を除く
		if (i+1) == 1: continue
		# 約数の場合
		if n%(i+1) == 0:
			if (i+1) not in div_dic: div_dic[i+1] = 0
			div_dic[i+1] += 1
			return calc_divisor(n//(i+1), div_dic)

# 入力取得
a,b = [int(e) for e in input().split(" ")]

# 約数に分解
div_dic_a = calc_divisor(a)
div_dic_b = calc_divisor(b)

# 約数の和集合を計算
div_ls = list(div_dic_a) + list(div_dic_b)
div_ls = list({k: 1 for k in div_ls})
div_dic = {k:div_dic_a[k] if div_dic_a.get(k,0) > div_dic_b.get(k,0) else div_dic_b[k] for k in div_ls}
# print(div_dic)

# 最小公約数を計算
ans = 1
for k in div_dic:
	ans *= k ** div_dic[k]

print(ans)


### FIXED CODE ###


# Beginners Contest (C)

import sys

# 約数に分解
def calc_divisor(n):
	div_dic = {}
	if n == 1: return div_dic
	k = 2
	while True:
		# 約数の場合
		if n%k == 0:
			if k not in div_dic: div_dic[k] = 0
			div_dic[k] += 1
			n = n//k
			if n == 1: break
		else:
			k += 1
	return div_dic

# 入力取得
a,b = [int(e) for e in input().split(" ")]

# 約数に分解
div_dic_a = calc_divisor(a)
div_dic_b = calc_divisor(b)

# 約数の和集合を計算
div_ls = list(div_dic_a) + list(div_dic_b)
div_ls = list({k: 1 for k in div_ls})
div_dic = {k:(div_dic_a[k]
	if div_dic_a.get(k,0) > div_dic_b.get(k,0)
	else div_dic_b[k]) for k in div_ls}
# print(div_dic)

# 最小公倍数を計算
ans = 1
for k in div_dic:
	ans *= k ** div_dic[k]

print(ans)
import math


def get_stamina(x, p):
    return (x - p) ** 2


n = int(input())
persons_coordinates = list(map(int, input().split()))
max_coordinate = max(persons_coordinates)
min_stamina = math.inf


for p in range(max_coordinate + 1):
    stamina = 0
    for x in persons_coordinates:
        stamina += get_stamina(x, p)
    
    if min_stamina >= stamina:
        min_stamina = stamina
print(min_stamina)

### FIXED CODE ###

N = int(input())
x = input().split()
avg = 0

for i in range (N) :
    x[i] = int(x[i])
    avg += x[i]

avg1 = avg // N
avg2 = avg // N + 1

ans1 = 0
ans2 = 0

for i in range (N) :
    ans1 += (x[i] - avg1) ** 2
    ans2 += (x[i] - avg2) ** 2

print (int(min(ans1 , ans2)))
n,k = map(int,input().split())
l = list(map(int,input().split()))
l.sort()
if n-k+1 <= 0:
  print(0)
  quit()
else:
  L = l[0:n-K+1]
  L_sum = sum(L)
  print(L_sum)

### FIXED CODE ###

n,k = map(int,input().split())
l = list(map(int,input().split()))
l.sort()
if len(l) > k:
    print(sum(l[:n-k]))
else:
    print(0)
import sys
a= str(input())
kaibun = list(a)
n = int(len(kaibun))
answer = "No"
strongn1 = int((n-1)/2)
strongn2 = int((n+3)/2)
for i in reversed(range((int((n+1)/2)),n)):
    if kaibun[i] == kaibun[n-i-1]:
        answer = "Yes"
    else:
        answer = "No"
        print(answer)
        sys.exit()
for i in range(int(strongn1/2)):
    if kaibun[i] == kaibun[strongn1-i-1]:
        answer = "Yes"
    else:
    	answer="No"
    	print(answer)
    	sys.exit()
for i in reversed(range(strongn2,n,int((strongn1/2)-1))):
    if kaibun[i] == kaibun[strongn2-2-i+n]:
        answer = "Yes"
    else:
      	answer = "No"
print(answer)

### FIXED CODE ###

a= str(input())
kaibun = list(a)
n = int(len(kaibun))
answer = "No"
strongn1 = int((n-1)/2)
strongn2 = int((n+3)/2)
for i in reversed(range((int((n+1)/2)),n)):
    if kaibun[i] == kaibun[n-i-1]:
        answer = "Yes"
    else:
        answer = "No"
        break

if answer == "Yes":
    for i in range(int(strongn1/2)):

        if kaibun[i] == kaibun[strongn1-i-1]:
            answer = "Yes"
        else:
            answer="No"
            break
if answer == "Yes":
    for i in reversed(range(strongn2+int(strongn1/2)-1,n)):
        if kaibun[i] == kaibun[strongn2-2-i+n]:
            answer = "Yes"
        else:
            answer = "No"
            break
print(answer)
mod = 10**9+7
n = int(input())
g = [[] for _ in range(n)]

for _ in range(n-1):
    x, y = map(int, input().split())
    g[x-1].append(y-1)
    g[y-1].append(x-1)

white = [0 for _ in range(n)]
black = [0 for _ in range(n)]


def dfs(v):
    tmp_w = 1
    tmp_b = 1
    if len(g[v]) == 0:
        white[v] = 1
        black[v] = 1
        return None
    for w in g[v]:
        g[w].remove(v)
        dfs(w)
        tmp_w *= white[w]+black[w]
        tmp_b *= white[w]
        tmp_w %= mod
        tmp_b %= mod
    white[v] += tmp_w
    black[v] += tmp_b
    return None


dfs(0)

print((white[0]+black[0]) % mod)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

mod = 10**9+7
n = int(input())
g = [[] for _ in range(n)]

for _ in range(n-1):
    x, y = map(int, input().split())
    g[x-1].append(y-1)
    g[y-1].append(x-1)

white = [0 for _ in range(n)]
black = [0 for _ in range(n)]


def dfs(v):
    tmp_w = 1
    tmp_b = 1
    if len(g[v]) == 0:
        white[v] = 1
        black[v] = 1
        return None
    for w in g[v]:
        g[w].remove(v)
        dfs(w)
        tmp_w *= white[w]+black[w]
        tmp_b *= white[w]
        tmp_w %= mod
        tmp_b %= mod
    white[v] = tmp_w
    black[v] = tmp_b
    return None


dfs(0)

print((white[0]+black[0]) % mod)
n,x=map(int,input().split())
a=list(map(in,input().split()))

ans=1
d=0

for i in a:
  d+=i
  if d>x:
    break
  ans+=1
  
print(ans)

### FIXED CODE ###

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

ans=1
d=0

for i in a:
  d+=i
  if d>x:
    break
  ans+=1
  
print(ans)
import itertools
import math

N = int(input())
X = [list(map(int, input().split)) for _ in range(N)]

l = [i for i in range(N)]
ssum = 0
for v in itertools.permutations(l):
  distance = 0
  pre = [0, 0]
  for n in v:
    distance += math.sqrt((pre[0]-X[n][0])**2+(pre[1]-X[n][1])**2)
    pre = X[n]
  ssum += distance

print(ssum/math.factorial(N))

### FIXED CODE ###

import itertools
import math
 
N = int(input())
X = [list(map(int, input().split())) for _ in range(N)]

l = [i for i in range(N)]
ssum = 0
for v in itertools.permutations(l):
  distance = 0
  pre = X[v[0]]
  for n in v:
    distance += math.sqrt((pre[0]-X[n][0])**2+(pre[1]-X[n][1])**2)
    pre = X[n]
  ssum += distance

print(ssum/math.factorial(N))
import numpy as np
N, M = map(int, input().split())  # 品物の数、割引券の枚数
A = np.array(list(map(int, input().split())))  # 品物の値段
for _ in range(M):
    A[A.argmax()] = np.max(A) // 2
print(str(sum(A)))


### FIXED CODE ###

N, M = map(int, input().split())  # 品物の数、割引券の枚数
A = list(map(int, input().split()))  # 品物の値段
A.sort(reverse=True)
i = 0
for _ in range(M):
    A[i] = A[i] // 2
    if i <= N - 2 and A[i] < A[i + 1] and A[0] < A[i+1]:
        i += 1
    else:
        A.sort(reverse=True)
        i = 0
print(str(sum(A)))
A,B=list(map(int,input().split()))
B*=100
A=A*B
print(A//100)

### FIXED CODE ###

A,B=input().split()
B=int(B.replace(".",""))
A=int(A)*B
print(A//100)
import sys
sys.setrecursionlimit(10 ** 8)
n = int(input())
adjacent_list = [[] for i in range(n+1)]
data = []
edgedata = {}
for i in range(n-1):
    a, b = list(map(int, input().split()))
    data.append([a,b])
    adjacent_list[a].append(b)
    adjacent_list[b].append(a)
max_node = 0
finished = set()
for i in range(1,n):
    if len(adjacent_list[i]) > max_node:
        max_node = i
k = len(adjacent_list[max_node])
def dfs(node, num):
    node_list = sorted(adjacent_list[node], key = lambda x:len(adjacent_list[x]))
    color_list = [i for i in range(1,k+1) if i != num]
    c_i = 0
    finished.add(node)
    for i in node_list:
        if i not in finished:
            s = min(node, i)
            t = max(node, i)
            vv = str(s)+str(t)
            edgedata[vv] = color_list[c_i]
            dfs(i, color_list[c_i])
            c_i += 1
dfs(k,-1)
print(k)
for i in data:
    sss = (str(i[0]) + str(i[1]))
    print(edgedata[sss])
#output k

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 7)
n = int(input())
#隣接リスト
adjacent_list = [[] for i in range(n+1)]
#入力されたデータを保存しておくやつ
data = [None] * (n - 1)
#最終的に色を入れておくやつ。
#edgedata[(1,2)] => 1->2の辺の色を入れておく
edgedata = {}
for i in range(n-1):
    a, b = list(map(int, input().split()))
    data[i] = [a, b]
    adjacent_list[a].append(b)
    adjacent_list[b].append(a)
#つながってるノードが一番多いやつを保存しておく
max_node = 0
#探索が終わったやつを入れる
finished = set()
for i in range(1,n):
    if len(adjacent_list[i]) > len(adjacent_list[max_node]):
        max_node = i
#kには色の種類を入れる
k = len(adjacent_list[max_node])
#print("k => {}".format(k))
def dfs(node, num):
    #隣接リストの中身を、つながってるノード順にソート
    node_list = sorted(adjacent_list[node], key = lambda x:len(adjacent_list[x]))
    #さっきつかったいろは使わないようにする
    color_list = [i for i in range(1,len(node_list) + 2) if i != num]
    c_i = 0
    finished.add(node)
    for i in node_list:
        #まだ見てなかったら、dfsを掛ける
        if i not in finished:
            #小さいほうから大きいほうに文字を並べ、ハッシュに値を保存
            #print("{}".format(color_list))
            #print("c_i =>{}  node =>{}".format(c_i,node))
            edgedata[(min(node, i), max(node, i))] = color_list[c_i]
            #color_list[c_i]は使ったので、使った色として引数で渡す。
            dfs(i, color_list[c_i])
            #この色は使ったから、一個ずらす
            c_i += 1
#一番のノードを根とし、dfsをかける
dfs(k,-1)
print(k)
for i in data:
    print(edgedata[tuple(i)])
#output k
a = input()
b =　input()

count = int(a)

num = map(int, b.split())
division = True
result = 0
while division:
    div = 0
    for i in range(count):
        if num[i]%2 == 0:
            div += 1
    if div == count:
        for j in range(count):
            num.append(num.pop(0)/2)
        result += 1
    else:
        division = False

print(result)


### FIXED CODE ###


a = input()
b = input()
count = int(a)
num = []

for k in range(count):
    num.append(int(b.split()[k]))

result = 0
division = True
while division:
    div = 0
    for i in range(count):
        if num[i]%2 == 0:
            div += 1
    if div == count:
        for j in range(count):
            num.append(num.pop(0)/2)
        result += 1
    else:
        division = False

print(result)
h,w = map(int,input().split())
S = [int(input()) for _ in range(h*w)]
for i in range(h*w):
  if S[i] == 'snuke':
    print(i+1)

### FIXED CODE ###

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

h = w = 0
for i in range(H):
    if 'snuke' in S[i]:
        h = i
        w = S[i].index('snuke')
        break
print(chr(ord('A') + w) + str(h + 1))
a,v,b,w,t=int(input().split())
 
if a<b and (b+w*t)<=(a+v*t):
    print('YES')
if a>b and (a-v*t)<=(b-w*t):
    print('YES')
else:
    print('NO')

### FIXED CODE ###

a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())
 
if a<b:
  if b+w*t<=a+v*t:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-v*t<=b-w*t:
    print('YES')
  else:
    print('NO')
s=input()
t=input()

s.sort()
t.sort()

if s==t:
  print("No")
else:
  u=[s,t].sort()
  if u[0]==s:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

s=list(input())
t=list(input())

s.sort()
t.sort(reverse=True)

if s==t:
  print("No")
else:
  u=[s,t]
  u.sort()
  if u[0]==s:
    print("Yes")
  else:
    print("No")
import sys

args = sys.argv

if(sys.argv[0]<10 && sys.argv[1]<10) {
	print(argv[0]*argv[1])
} else {
	print('-1')
}

### FIXED CODE ###

import sys
 
input = sys.stdin.readline().split()
result = 1
for n in input:
  n=int(n)
  if result==-1:
    break
  if n<10:
    result = result * n
  else:
    result=-1
print(result)
N = int(input())
As = [int(n) for n in input().split()]
# len(As) = N
# Ai = 身長
c = 0
for i, ai in enumerate(As):
    # i + ai = 最低これだけ先が無いとダメ
    j0 = i + ai
    if j0 >= N-1:
        continue
    j = 1
    l = N - j0 - 1
    while l > 0:
        if j == As[j0+j]:
            c += 1
        j+=1
        l-=1
print(c)

### FIXED CODE ###

s = input()
if s == 'ABC':
  print('ARC')
else:
  print('ABC')
a,b = input().split()
s = int(a+b)
for i in range(s**0.5+1):
  if s == i**2:
    print("Yes")
    exit()
print("No")

### FIXED CODE ###

a,b = input().split()
s = int(a+b)
for i in range(int(s**0.5)+1):
  if s == i**2:
    print("Yes")
    exit()
print("No")
A, B, C = map(int, input().split())
return (A*B)//2

### FIXED CODE ###

A, B, C = map(int, input().split())
print((A*B)//2)
n,a,b = map(int,input().split())
ans = 0

for i in range(n+1):
    if a<= sun(list(map(int,list(str(i)))) <=b
        ans += i
print(ans)

### FIXED CODE ###

n, a, b = map(int, input().split())
ans = 0
for i in range(n+1):
    if a <= sum(list(map(int, list(str(i))))) <= b:
        ans += i
print(ans)
n = int(input())
c = [0] * n
s = [0] * n
f = [0] * n
for i in range(n - 1):
    c[i], s[i], f[i] = map(int, input().split())

for i in range(n - 1):
    total = 0
    for j in range(i, n - 1):
        if total < s[j]:
            total = s[j]
        elif (total - s[j]) % f[j] == 0:
            total += f[j] - total % f[j]
        total += c[j]

    print(total)

print(0)


### FIXED CODE ###

n = int(input())
print(48 - n)
A = list(map(int, input().split())).sort()
K = int(input())

A[-1] = A[-1]*2**K
print(sum(A))

### FIXED CODE ###

A = sorted(list(map(int, input().split())))
K = int(input())

A[-1] = A[-1]*2**K
print(sum(A))
import math
def findSumOfDigits(n):
    sum =0
    while n > 0:
        sum += n % 10
        n = n//10
    return sum

N = int(input())
examples = list()

for i in range(N)[1:math.ceil(N/2)]:
    A = i
    B = N - i
    total = findSumOfDigits(A) + findSumOfDigits(B)
    examples.append(total)

print(min(examples))

### FIXED CODE ###

def findSumOfDigits(n):
    sum =0
    while n > 0:
        sum += n % 10
        n = n//10
    return sum

N = int(input())
examples = list()

for i in range((N//2)+1)[1:]:
    A = i
    B = N - i
    total = findSumOfDigits(A) + findSumOfDigits(B)
    examples.append(total)

print(min(examples))