Harryxun/stf_run huggingface dataset:
import numpy as np

n = int(input())
a = np.array(list(map(int, input().split())), dtype = 'object')
mod = 10**9 + 7

sq_sum_a = sum(a)**2
sum_sq_a = sum(a**2)

sum_cross = (sq_sum_a - sum_sq_a) // 2
ans = sum_cross % mod
# xy = ((x + y)**2 - (x**2 + y**2)) // 2

print(ans)

### FIXED CODE ###

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

sum_sq_a = 0
for i in range(n):
    sum_sq_a += a[i]**2

ans = ((sum(a))**2 - sum_sq_a) // 2

print(ans % (10**9 + 7))
#りんごの数
A = int(input())
#かけらの数
P = int(input())
#合計のかけらの数
sum_p = A*3 + P
print(sum_p // 2)

### FIXED CODE ###

#りんごの数とかけらの数
A, P = map(int, input().split())
#合計のかけらの数
sum_p = A*3 + P
print(sum_p // 2)
N=int(input())
g = [[] for i in range(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)

nim = [-1 for i in range(N)]

def dfs(cur,par):
	val = 0
	for dst in g[cur]:
		if dst == par:
			continue
		val ^= dfs(dst,cur) + 1
	nim[cur] = val
	return val

dfs(0 , -1)
print(nim)
if nim[0] == 0:
	print('Bob')
else:
	print('Alice')

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)
N=int(input())
g = [[] for i in range(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)

nim = [-1 for i in range(N)]

def dfs(cur,par):
	val = 0
	for dst in g[cur]:
		if dst == par:
			continue
		val ^= dfs(dst,cur) + 1
	nim[cur] = val
	return val

dfs(0 , -1)
#print(nim)
if nim[0] == 0:
	print('Bob')
else:
	print('Alice')
N, M, K = map(int, input().split())
A_list = list(map(int, input().split()))
B_list = list(map(int, input().split()))


A_list.insert(0, 0)
B_list.insert(0, 0)
B_cumsum = np.cumsum(B_list)

time = B_cumsum[-1]
ans, j = 0, M

for i in range(N+1):
    if (time > K):
        break
    while (j > 0 and time > K):
        time -= B_list[j]
        j -= 1

    ans = max(ans, i+j)
    time += A_list[i]

print(ans)


### FIXED CODE ###


import sys
import numpy as np
input = sys.stdin.readline

N, M, K = map(int, input().split())
A_list = list(map(int, input().split()))
B_list = list(map(int, input().split()))


A_list.insert(0, 0)
B_list.insert(0, 0)
A_cumsum = np.cumsum(A_list)
B_cumsum = np.cumsum(B_list)

time = B_cumsum[-1]
ans, j = 0, M



for i in range(N+1):
    if A_cumsum[i] > K:
        break
    while B_cumsum[j] > K - A_cumsum[i]:
        j -= 1
    ans = max(ans, i+j)
print(ans)
from fractions import gcd
from functools import reduce
n=int(input())
a=list(map(int,input().split()))
def gcd(*numbers):
    return reduce(gcd, numbers)
def gcd_list(numbers):
    return reduce(gcd, numbers)
print(gcd_list(a))

### FIXED CODE ###

import fractions
from functools import reduce
n=int(input())
a=list(map(int,input().split()))
print(reduce(fractions.gcd,a))
"""
#の右に.が無いようにしたい
一番左にある#.もしくは一番右にある#の部分
"""
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n = int(readline())
s = readline().rstrip().decode('utf-8')
ans = 10**9
res = 0
for i in range(n-1):
    if s[i] == "#":
        if s[i+1] == ".":
            res = i
            break

ans = min(ans,s[i:].count("."))

ans = min(ans,s.count("#"),s.count("."))

print(ans)

### FIXED CODE ###

import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0
n = int(readline())
s = readline().rstrip().decode('utf-8')
res = s.count(".")
ans = res
for i in range(n):
    if s[i] == "#":
        res += 1
    else:
        res -= 1
    ans = min(ans,res)

print(ans)
import sys
n,m = map(int,input().split())
graph = [list(input().split(" ")) for i in range(n)]

result=0

def dfs(a, list, graph,  result):
  print(list)
  if len(list) == n:
    result = result + 1

  for g in graph:
    if g[0] == a and g[1] not in list:
      list.append(g[1])
      result = dfs(g[1], list, graph, result)
    if g[1] == a and g[0] not in list:
      list.append(g[0])
      result = dfs(g[0], list, graph, result)

  return result

for g in graph:
  list = []
  if g[0] == "1":
    list.append(1)
    result += dfs("1", list, graph, 0)

print(result)


### FIXED CODE ###

N, M = map(int, input().split())
adj_matrix = [[0]* N for _ in range(N)]

for i in range(M):
    a, b = map(int, input().split())
    adj_matrix[a-1][b-1] = 1
    adj_matrix[b-1][a-1] = 1

def dfs(v, used):
    if not False in used:
        return 1
    
    ans = 0
    for i in range(N):
        if not adj_matrix[v][i]:
            continue
        if used[i]:
            continue
        
        used[i] = True
        ans += dfs(i, used)
        used[i] = False
    
    return ans

used = [False] * N
used[0] = True

print(dfs(0, used))
def calculate(people_num, limit, height_array):
    permission = [height for height in height_array if height >= limit]
    return len(permission)

if __name__ == "__main__":
    input_data = '\n'.join(iter(raw_input, '')).split()
    people_num = input_data[0]
    limit= input_data[1]
    height_array = input_data[2:len(input_data)-1]
    result_num = calculate(people_num, limit, height_array)
    print(result_num)
    

### FIXED CODE ###

def calculate(people_num, limit, height_array):
    permission = [height for height in height_array if height >= limit]
    return len(permission)
 
if __name__ == "__main__":
    people_num, limit = map(int, input().split())
    height_array = map(int, input().split())
    result_num = calculate(people_num, limit, height_array)
    print(result_num)
mod=10**9+7
x,y=map(int,input().split())

a=(-x+2*y)//3
b=(2*x-y)//3

f=[1]
for i in range(1,a+b):
    f.append(f[-1]*i%mod)

if a+2*b==x and 2*a+b==y:
    print(f[a+b]*pow(f[a]*f[b],mod-2,mod)%mod)
else:
    print(0)


### FIXED CODE ###

import sys
mod=10**9+7
x,y=map(int,input().split())

a=(-x+2*y)//3
b=(2*x-y)//3

if a<0 or b<0:
  print(0)
  sys.exit()
  
f=[1]
for i in range(1,a+b+1):
    f.append(f[-1]*i%mod)

if a+2*b==x and 2*a+b==y:
    print(f[a+b]*pow(f[a]*f[b],mod-2,mod)%mod)
else:
    print(0)
import sys

class Tree:
    def __init__(self,parent,left,right):
        self.parent = parent
        self.left = left
        self.right = right


def setdepth(u, p):
    depths[u] = p
    if trees[u].right != -1:
        # ???????????????????????±???????¨????
        setdepth(trees[u].right, p)
    if trees[u].left != -1:
        # ??????????????????????????±???+1????¨????
        setdepth(trees[u].left, p+1)

sys.setrecursionlimit(200000)
N = int(input())
# ?????????
trees = [Tree(-1,-1,-1) for i in range(N)]
for i in range(N):
    l = list(map(int, input().split()))
    no = l[0]
    jisu = l[1]
    # 2???????????????????????§???????´??????????
    childs = l[2:]
    for j in range(jisu):
        child = childs[j]
        if j == 0:
            trees[no].left = child

        if j != len(childs)-1:
            trees[child].right = childs[j+1]

        trees[child].parent = no

r = 0
for i in range(N):
    if trees[i].parent == -1:
        r = i

depths = [-1] * N
setdepth(r, 0)

for i in range(N):
    type = ""
    if trees[i].parent == -1: type = "root"
    elif trees[i].left == -1: type = "leaf"
    else: type = "internal node"
    childs = "["
    child = trees[i].left
    while child != -1:
        childs += str(child)
        child = trees[child].right
        if child != -1: childs += ", "
    childs += "]"

    print("node {0}: parent = {1}, depth = {2}, {3}, {4}".format(i, trees[i].parent, depths[i], type, childs))

### FIXED CODE ###

class Tree:
    def __init__(self,parent,left,right):
        self.parent = parent
        self.left = left
        self.right = right

def getdepth(u):
    for i in range(N):
        depth = 0
        j = i
        while trees[j].parent != -1:
            j = trees[j].parent
            depth += 1
        depths[i] = depth


N = int(input())
# ?????????
trees = [Tree(-1,-1,-1) for i in range(N)]
for i in range(N):
    l = list(map(int, input().split()))
    no = l[0]
    jisu = l[1]
    # 2???????????????????????§???????´??????????
    childs = l[2:]
    for j in range(jisu):
        child = childs[j]
        if j == 0:
            trees[no].left = child

        if j != len(childs)-1:
            trees[child].right = childs[j+1]

        trees[child].parent = no

r = 0
for i in range(N):
    if trees[i].parent == -1:
        r = i

depths = [-1] * N
getdepth(r)

for i in range(N):
    type = ""
    if trees[i].parent == -1: type = "root"
    elif trees[i].left == -1: type = "leaf"
    else: type = "internal node"
    childs = "["
    child = trees[i].left
    while child != -1:
        childs += str(child)
        child = trees[child].right
        if child != -1: childs += ", "
    childs += "]"

    print("node {0}: parent = {1}, depth = {2}, {3}, {4}".format(i, trees[i].parent, depths[i], type, childs))
n = int(input())
v = list(map(int,input().split()))
l = []
r = []
for i in range(0,n//2):
    l.append(v[2*i])
    r.append(v[2*i+1])

lc = []
rc = []
vmax =max(max(l),max(r))
for i in range(1,vmax+1):
    lc.append([i, l.count(i)])
    rc.append([i, r.count(i)])
lc.sort(key=lambda x:x[1])
rc.sort(key=lambda x:x[1])
lc.reverse()
rc.reverse()
if lc[0][0] == rc[0][0]:
    if lc[0][1] == rc[0][1]:
        if lc[1][1] == rc[1][1]:
            print(n-lc[0][1]-rc[1][1])
        else:
            print(n-lc[0][1]-max(lc[1][1],rc[1][1]))
    else:
        print(n-max(lc[0][1]+rc[1][1],rc[0][1]+lc[1][1]))
else:
    print(n-lc[0][1]-rc[0][1])        



### FIXED CODE ###

import collections
n = int(input())
v = list(map(int,input().split()))
l = []
r = []
for i in range(0,n//2):
    l.append(v[2*i])
    r.append(v[2*i+1])
       

lc = collections.Counter(l).most_common()
rc = collections.Counter(r).most_common()

if lc[0][0] == rc[0][0]:
    if len(lc)==1:
        print(n//2)
    else:
        print(n-max(lc[0][1]+rc[1][1],lc[1][1]+rc[0][1]))
else:
    print(n-lc[0][1]-rc[0][1])
def divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n%i == 0:
            divisors.append(i)
            if i != n//i:
                divisors.append(n//i)
    return sorted(divisors) 
n = int(input())
ans = len(divisors(n-1))-1;
for k in divisors(N)[1:]:
    boz = n
    while (n % k == 0):
        n = n//k
    if (n % k == 1):
	    ans += 1
    n = boz
print(ans)

### FIXED CODE ###

def divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n%i == 0:
            divisors.append(i)
            if i != n//i:
                divisors.append(n//i)
    return sorted(divisors) 
n = int(input())
ans = len(divisors(n-1))-1;
for k in divisors(n)[1:]:
    boz = n
    while (n % k == 0):
        n = n//k
    if (n % k == 1):
	    ans += 1
    n = boz
print(ans)
X,K,D = map(int,input().split())
List = []

if K == 1:
    print(min(abs(X-D),abs(X+D)))
elif K == 2:
    print(min(abs(X+D+D),abs(X-D-D),abs(X)))
elif K == 3:
    print(min(abs(X+D+D+D),abs(X+D),abs(X-D),abs(X-D-D-D)))
else:
    for i in range(3):
        if abs(X - D) >= abs(X+D):
            List.append(abs(X+D))
            X = X+D
        else:
            List.append(abs(X-D))
            X = X-D

    for i in range(K-3):
        if List[i] == List[i+2]:
            if K%2 == i%2:
                print(List[i+1])
            else:
                print(List[i])
            break
        else:
            if abs(X - D) >= abs(X+D):
                List.append(abs(X+D))
                X = X+D
            else:
                List.append(abs(X-D))
                X = X-D
    print(List[K-1])
                

### FIXED CODE ###

S = input()
count = 0

if S.count("R") == 0:
    count = 0
elif S.count("R") == 1:
    count= 1
elif S.count("R") == 2:
    if S == "RSR":
        count = 1
    else:
        count = 2
else:
    count = 3
    
print(count)
n,c=map(int,input().split())
x=[0]
v=[]
for i in range(n):
    a,b=map(int,input().split())
    x.append(a)
    v.append(b)

x1=[x[i+1]-x[i] for i in range(len(x)-1)]
x2=[c-x[-1]]+x1[:0:-1]
h=[0]
for i,j in zip(x2,reversed(v)):
    h.append(h[-1]+j+-i)
t=[0]
for i,j in zip(x1,v):
    t.append(t[-1]+j-i)
hi=h.index(max(h[0:-1]))
ti=t.index(max(t[0:-1]))
tm=max(t[0:-1])
hm=max(h[0:-ti])
h2=[h[i]-c+x[-i] for i in range(1,len(h))]
t2=[t[i]-x[i] for i in range(1,len(t))]
print(h,t)
print(h2,t2)

#print(ti,hi)
print(max(max(t), max(h), hm+max(t2[0:-ti]),tm+max(h2[:-hi])))

### FIXED CODE ###

n,c=map(int, input().split())
a=[[0,0]]+[list(map(int, input().split())) for i in range(n)]+[[c,0]]
m=[0]
h=[0]
mb=[0]
hb=[0]
for i in range(n+1):
    m.append(m[-1]-a[i+1][0]+a[i][0]+a[i+1][1])
    mb.append(m[-2]-a[i+1][0]+a[i][0]+a[i+1][1]-a[i+1][0])
    h.append(h[-1]-a[-i-1][0]+a[-i-2][0]+a[-i-2][1])
    hb.append(h[-2]-a[-i-1][0]+a[-i-2][0]+a[-i-2][1]-c+a[-i-2][0])

mm=[0]
for i in range(n):
    mm.append(max(mm[-1],m[i+1]))
hm=[0]
for i in range(n):
    hm.append(max(hm[-1],h[i+1]))
    
ans=max(hm[-1],mm[-1])
for i in range(1,n):
    ans=max(hb[i]+mm[-i-1], mb[i]+hm[-i-1],ans)
print(ans)
N,M = map(int,input().split())
A = list(map(int,input().split()))
CB = {}
for _ in range(M):
    b,c = map(int,input().split())
    if c in CB.keys():
        CB[c] += b
    else:
        CB[c] = b

A.sort()

K = sorted(list(CB.keys()),reverse=True)
L = []
for k in K:
    L += [k]*CB[k]

res = 0
for i in range(min(N,len(L))):
    if L[i] >= A[i]:
        res += L[i]
    else:
        res += sum(A[i:])
        break
else:
    res += sum(A[i+1:])

print(res)

### FIXED CODE ###

N,M = map(int,input().split())
A = list(map(int,input().split()))
X = [list(map(int,input().split())) for _ in range(M)]
A.sort()
X.sort(key=lambda x:-x[1])

j = 0
for i in range(N):
    if X[j][1] < A[i]:
        break
    else:
        X[j][0] -= 1
        A[i] = X[j][1]
    if X[j][0] == 0:
        j += 1
    if j == M:
        break

print(sum(A))
#A
#B
#C
if False:
    N=int(input())
    S=[input() for _ in range(N)]
    march=list('MARCH')
    nam=[[] for _ in range(len(march))]
    for s in S:
        if s[0] in march:
            nam[march.index(s[0])].append(s)
    ans=0
    for i in range(5):
        for j in range(i+1,5):
            for k in range(j+1,5):
                ans+=len(nam[i])*len(nam[j])*len(nam[k])
    print(ans)

#D
N=int(input())
ver=[[] for _ in range(N)]
for _ in range(N-1):
    u,v,W=map(int,input().split())
    ver[u-1].append((v-1,W))
    ver[v-1].append((u-1,W))
his=[-1 for _ in range(N)]

def dfs(i,col):
    his[i]=col
    for j,w in ver[i]:
        if his[j]==-1:
            if w%2==0:
                his[j]=col
                dfs(j,col)
            else:
                dfs(j,(col+1)%2)

dfs(0,0)            
for i in range(N):
    print(his[i])


### FIXED CODE ###

import sys

if sys.getrecursionlimit()<10**7:
    sys.setrecursionlimit(10**7)

N=int(input())
ver=[[] for _ in range(N)]
for _ in range(N-1):
    u,v,W=map(int,input().split())
    ver[u-1].append((v-1,W))
    ver[v-1].append((u-1,W))
his=[-1 for _ in range(N)]

def dfs(i,col):
    his[i]=col
    for j,w in ver[i]:
        if his[j]==-1:
            if w%2==0:
                dfs(j,col)
            else:
                dfs(j,(col+1)%2)

dfs(0,0)            
for i in range(N):
    print(his[i])
A, B, C, D, E, F = map(int, input().split())

W = sorted(list({a*100*A + b*100*B for a in range(F // 100 // A + 1) for b in range(F // 100 // B + 1) if a*100*A + b*100*B <= F}))
S = [max([c*C + d*D for c in range(int((E*w / 100) / C) + 1) for d in range(int((E*w / 100) / D) + 1) if ((c*C + d*D)*100 <= E*w) and (c*C + d*D + w <= F)]) for w in W]
I = sorted([i for i in range(len(W))], key=lambda i : W[i]/(W[i] + S[i]) if W[i] > 0 else 1)[0]
print(A[0] if W[I] == 0 else W[I] + S[I], S[I])

### FIXED CODE ###

A, B, C, D, E, F = map(int, input().split())

W = sorted(list({a*100*A + b*100*B for a in range(F // 100 // A + 1) for b in range(F // 100 // B + 1) if a*100*A + b*100*B <= F}))
S = [max([c*C + d*D for c in range(int((E*w / 100) / C) + 1) for d in range(int((E*w / 100) / D) + 1) if ((c*C + d*D)*100 <= E*w) and (c*C + d*D + w <= F)]) for w in W]
I = sorted([i for i in range(len(W))], key=lambda i : W[i]/(W[i] + S[i]) if W[i] > 0 else 1)[0]
print(100*A if W[I] == 0 else W[I] + S[I], S[I])
s, t = input(), input()

x = list(filter(lambda i:s[i] != t[i], range(len(s)) ))

print(len(x))

### FIXED CODE ###

a = int(input())
print(a + a**2 + a**3)
H,W　= (int(i) for i in input().split())
h,w　= (int(i) for i in input().split())

print ((H-h)*(W-w))

### FIXED CODE ###

H,W = (int(i) for i in input().split())
h,w = (int(i) for i in input().split())
print((H-h)*(W-w))
L, R = map(int, input().split())
number = list(range(L, R + 1))
min = 2100
for i in range(len(number) - 1):
    j = i + 1
    while(j < len(number)):
        if(min > number[i] * number[j] % 2019):
            min =  number[i] * number[j] % 2019
        if(min == 0):
            break
        j += 1
    if(min == 0):
        break
print(min)

### FIXED CODE ###

L, R = map(int, input().split())
min = 2100
for i in range(L, R):
    j = i + 1
    while(j < R + 1):
        if(min > i * j % 2019):
            min =  i * j % 2019
        if(min == 0):
            break
        j += 1
    if(min == 0):
        break
print(min)
S = int[h = (S / 3600), m = (S / 60), for S in range(0, 60) input()]
print('S')

### FIXED CODE ###

S = int(input())

s = S % 60
m = S // 60 % 60
h = S // 60 // 60

print("{0}:{1}:{2}".format(h,m,s))
import sys

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

import heapq

ABs = [[] for _ in range(M + 1)]
for i in range(N):
    A, B = map(int, input().split())
    ABs[A].append(-B)
heapq.heapify(ABs[0])

As = 0
for i in range(M + 1):
    if i > 0:
        for b in ABs[i]:
            heapq.heappush(ABs[0], b)
    if len(ABs[0]) > 0:
        As -= heapq.heappop(ABs[0])
print(As)


### FIXED CODE ###

import sys

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

import bisect

ABs = [[] for _ in range(M + 1)]
for i in range(N):
    A, B = map(int, input().split())
    if A <= M:
        ABs[A].append(B)
ABs[0].sort()

As = 0
for i in range(M + 1):
    if i > 0:
        for b in ABs[i]:
            bisect.insort_left(ABs[0], b)
    if len(ABs[0]) > 0:
        As += ABs[0].pop()
print(As)
r1, c1, r2, c2 = map(int, input().split())

MOD = 10 ** 9 + 7
MAX = 10 ** 6 + 5
modinv = lambda a, mod=MOD: pow(a, mod - 2, mod)
fac, inv = [1] * MAX, [1] * MAX
for i in range(1, MAX):
    fac[i] = fac[i - 1] * i % MOD
    inv[i] = modinv(fac[i])


def comb(n, k, error=0):
    if not 0 <= k <= n:
        return error
    return fac[n] * inv[k] * inv[n - k] % MOD


ans = comb(r2 + c2 + 2, r2 + 1) + comb(r1 + c1, r1) - comb(r1 + c2 + 1, r1) - comb(r2 + c1 + 1, c1)
ans %= MOD
print(ans)

### FIXED CODE ###

r1, c1, r2, c2 = map(int, input().split())

MOD = 10 ** 9 + 7
MAX = 2 * 10 ** 6 + 10
modinv = lambda a, mod=MOD: pow(a, mod - 2, mod)
fac, inv = [1] * MAX, [1] * MAX
for i in range(1, MAX):
    fac[i] = fac[i - 1] * i % MOD
    inv[i] = modinv(fac[i])


def comb(n, k, error=0):
    if not 0 <= k <= n:
        return error
    return fac[n] * inv[k] * inv[n - k] % MOD


ans = comb(r2 + c2 + 2, r2 + 1) + comb(r1 + c1, r1) - comb(r1 + c2 + 1, r1) - comb(r2 + c1 + 1, c1)
ans %= MOD
print(ans)
import  math
lis = []

N,M = [int(i) for i in input().split()]
M_ = M
i = 2
for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)

lis.sort()
ret = 0
for i in lis:

    ret = i
    if i > N:
        break

print(M_//ret )


### FIXED CODE ###

import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )
#!/usr/bin/env python
from collections import deque, defaultdict
import bisect
from math import factorial, sqrt, log2


def main():
    a, b, c = map(int, input().split())

    right = log2(c - a - b)
    left = 1 + 0.5 * (log2(a) + log2(b))

    if right > left:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python
from collections import deque, defaultdict
import bisect
from math import factorial, sqrt


def main():
    a, b, c = map(int, input().split())

    right = c - a - b
    if right <= 0:
        print("No")
        return
    right = right ** 2
    left = 4 * a * b

    if right > left:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
a=input()
if a=='hi' or
   a=='hihi' or
   a=='hihihi' or
    a=='hihihihi' or
    a=='hihihihihi' :    
    print('Yes')
else:
    print('No')
 

### FIXED CODE ###

a=input()
if a=='hi' or a=='hihi' or a=='hihihi' or  a=='hihihihi' or a=='hihihihihi' :    
    print('Yes')
else :
    print('No')
from collections import Counter
cnt = Counter()
for i in range(3):
  cnt.update([int(item) for item in input().split()])
a = cnt.values()
a.sort()
if a[0] == 1 and a[1] == 1 and a[2] == 2 and a[3] == 2:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

from collections import Counter
cnt = Counter()
for i in range(3):
  cnt.update([int(item) for item in input().split()])
a = list(cnt.values())
a.sort()
if a[0] == 1 and a[1] == 1 and a[2] == 2 and a[3] == 2:
  print("YES")
else:
  print("NO")
s=input()
for i in range(len(s)-1):
  for j in range(i+1,len(s)+1):
    if s[i]==s[j]:
      print("no")
      exit()
print("yes")


### FIXED CODE ###

s=input()
for i in range(len(s)-1):
  for j in range(i+1,len(s)):
    if s[i]==s[j]:
      print("no")
      exit()
print("yes")
N,M =[int(i)for i in input().split()]
l=[]
for i in range(2,int(M**0.5+1)):
    if M%i==0:
        if M/i >= N:
            l.append(i)
        if i >= N:
            l.append(M/i)
print(max(l))

### FIXED CODE ###

N,M =[int(i)for i in input().split()]
l=[]
for i in range(1,int(M**0.5+2)):
    if M%i==0:
        if M/i >= N:
            l.append(i)
        if i >= N:
            l.append(M/i)
print(int(max(l)))
1 2 3

li = input().split()

print(li[3] + " " + li[2] + " " + li[1])

### FIXED CODE ###

x, y, z = map(str, input().split())
print(z + " " + x + " " + y)
n = int(input())
list1 = list(map(int, input().split()))
great = 9999999
for i in range(n - 1):
  temp = int(abs(sum(list1[:i + 1]) - sum(list1[i + 1:])))
  if temp < great:
    great = temp
print(samin)


### FIXED CODE ###

n = int(input())
list1 = list(map(int, input().split()))
great = 9999999
for i in range(n - 1):
  temp = int(abs(sum(list1[:i + 1]) - sum(list1[i + 1:])))
  if temp < great:
    great = temp
print(great)
s=input()
ans=len(s)
def a(s,t):
  ss=""
  a=0
  b=False
  for i in range(len(s)-1):
    if s[i]!=t!=s[i+1]:ss+=s[i];b=True
    else:ss+=t
  if b:a=a(ss,t)
  return a+1
for i in s:ans=min(ans,a(s,i))
print(ans)

### FIXED CODE ###

s=input()
ans=len(s)
for i in "abcdefghijklmnopqrstuvwxyz":
  t=a=0
  for j in s:
    if j==i:a=max(a,t);t=0
    else:t+=1
  a=max(a,t)
  ans=min(ans,a)
print(ans)