Harryxun/stf_run huggingface dataset:
from collections import defaultdict
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


class UnionFind:
    """
    sizeによる実装
    """

    def __init__(self, N):
        self.parent = [i for i in range(N)]
        self.size = [1 for _ in range(N)]

    def find(self, x):
        if self.parent[x] == x:
            return x
        else:
            return self.find(self.parent[x])

    def union(self, x, y):
        px = self.find(x)
        py = self.find(y)
        if px == py:
            return
        if self.size[px] < self.size[py]:
            self.parent[px] = py
            self.size[py] += self.size[px]
        else:
            self.parent[py] = px
            self.size[px] += self.size[py]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def connectedNum(self, x):
        return self.size[self.find(x)]


N, M = map(int, input().split())
Un = UnionFind(M)
D = defaultdict(lambda: set())
for i in range(N):
    _, *L = map(int, input().split())
    for l in L:
        D[l].add(i)
for i in range(M):
    l = list(D[i])
    for d in l[1:]:
        Un.union(l[0], d)
if Un.size[Un.find(0)] == N-1:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


class UnionFind:
    """
    sizeによる実装
    """

    def __init__(self, N):
        self.parent = [i for i in range(N)]
        self.size = [1 for _ in range(N)]

    def find(self, x):
        if self.parent[x] == x:
            return x
        else:
            return self.find(self.parent[x])

    def union(self, x, y):
        px = self.find(x)
        py = self.find(y)
        if px == py:
            return
        if self.size[px] < self.size[py]:
            self.parent[px] = py
            self.size[py] += self.size[px]
        else:
            self.parent[py] = px
            self.size[px] += self.size[py]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def connectedNum(self, x):
        return self.size[self.find(x)]


N, M = map(int, input().split())
Un = UnionFind(N)  # 会話できる人をつなげる
D = defaultdict(lambda: [])
for i in range(N):
    _, *L = map(lambda x: int(x)-1, input().split())
    for l in L:
        D[l].append(i)
for i in range(M):
    if len(D[i]) > 1:
        t = D[i]
        for d in t[1:]:
            Un.union(t[0], d)
if Un.size[Un.find(0)] == N:
    print("YES")
else:
    print("NO")
N = int(input())
L = []
for i in range(N):
  A = int(input())
  for j in range(A):
    x ,  y= map(int,input().split())
    L.append([i+1,x,y])

from itertools import permutations, combinations,combinations_with_replacement,product
LL = list(product(range(2), repeat=N))
cnt = 0
for i in LL:
  for j in L:
    #jの情報は、(hatsugen=i,hito=x,flg=1,0)
    #iの情報は、(flg(i),...,)
    if i[j[0]-1]==1:
      k = j[2]
    else:
      k = 1- j[2]
    flg = 1
    if i[j[1]-1]!=k:
      flg = 0
      break
  cnt = max(cnt,sum(i)*flg)
print(cnt)

### FIXED CODE ###

N = int(input())
L = []
for i in range(N):
  A = int(input())
  LA = []
  for j in range(A):
    LA.append(list(map(int,input().split())))
  L.append(LA)
from itertools import product
LL = list(product(range(2), repeat=N))
cnt = 0
for i in LL:
  flg = True
  for j in range(len(L)):
    #jの情報は、(hito=x, singi = y=1,0)
    #iの情報は、(singi = (1/0,...,1/0))
    for x,y in L[j]:
      #jさんの情報      
      #i[j] :sinngi　正解
      #y:sinngi　を変換
      if i[j]==1:
        if i[x-1]!=y:
          flg = False
          break
  if flg:
    cnt = max(cnt,sum(i))
print(cnt)
# -*- coding: utf-8 -*-

inlist = input().split()
n = int(inlist[0])
m = int(inlist[1])
k = int(inlist[2])
mat = [[1 for i in range(n)] for j in range(m)]

def initialize(i, j, matrix):
    for k in range(i):
        for l in range(j):
            matrix[k][l] = 1
    return matrix

def sum_mat(i, j, matrix):
    sum = 0
    for k in range(i):
        for l in range(j):
            sum = sum + matrix[k][l]
    return sum

for l in range(n + 1): #l = 0 -> n
    print(mat)
    mat = initialize(n, m, mat)
    for i in range(l):
        for j in range(m):
            mat[i][j] = -mat[i][j]
    mat_save = mat
    for p in range(m + 1): # p = 0 -> m
        mat = mat_save
        for j in range(p):
            for i in range(n):
                mat[i][j] = -mat[i][j]
        sum = sum_mat(n, m, mat)
        if(sum == n * m - 2 * k):
            print("Yes")
        elif(l == n and p == m):
            print("No")




### FIXED CODE ###

# -*- coding: utf-8 -*-

s = input()
l = s.split("I")
if(l[0] == "YAK" and len(s) > 3):
    print("Yes")
else:
    print("No")
x=int(input())
a=[]
for i in range(1,x+1):
    for j in range(2,x+1):
        if i**j<=x:
            a.append(i**j)
print(max(set(a)))
    


### FIXED CODE ###

x=int(input())
m=1
for i in range(1,x):
    for j in range(2,x):
        if i**j<=x:
            m=max(m,i**j)
        else:
            break
print(m)
a=int(input("a=:"))
b=int(input("b=:"))
x=a*b
if x%2==0:
      print("Even")
else :
      print("Odd")


### FIXED CODE ###

a,b=map(int,input().split())
if (a*b)%2==0:
  print("Even")
else :
  print("Odd")
N, A, B = map(int, input().split())
ans = 0

AplusB = A+B

try:
    action_num = N // AplusB
except:
    action_num = 0
ans += action_num * A

try:
    action_mod = N % AplusB
except:
    action_mod = 0

one_action = "B"*A + "R"*B
try:
    for i in range(action_mod):
        if one_action[i] == "B":
            ans += 1
except:
    pass

print(ans)


### FIXED CODE ###

N, A, B = map(int, input().split())
ans = 0

AplusB = A+B

action_num = N // AplusB
ans += action_num * A

action_mod = N % AplusB

if action_mod <= A:
    ans += action_mod
else:
    ans += A

print(ans)
import copy
n,m,k = map(int, input().split())
mod = 998244353
#dp[i][j]:i個まで、j組
def com(n,r,m):
    #a = math.factorial(n)%m
    a = 1
    for i in range(1,n+1):
        a *= i
        a %= m
    A = pow(a,m-2,m)
    
    
    b= copy.deepcopy(A)   
    for i in range(n,r,-1):
        b = (b*i)%m
    
    c = copy.deepcopy(A)
    for i in range(n,n-r,-1):
        c = (c*i)%m
       
    return (a*b*c)%m

ans = m*pow(m-1,n-1,mod)
ans %= mod
#print(ans)
p = pow(m-1,n-k-2,mod)
#com(n-1,i,mod)
c = com(n-1,k+1,mod)
for i in range(k,0,-1):
    p *= (m-1)
    p %= mod
    c *= (i+1)
    c *= pow(n-i-1,mod-2,mod)
    c %= mod
    ans += m * p * c
    ans %= mod
    #print(m-1,i,mod)
    #print(ans)
print(ans)

### FIXED CODE ###

import copy
n,m,k = map(int, input().split())
if m==1:
    if (n-1==k):
        print(1)
    else:
        print(0)
    exit()

mod = 998244353
if (n-1==k):
    print(pow(m,n,mod))
    exit()
#dp[i][j]:i個まで、j組
def com(n,r,m):
    #a = math.factorial(n)%m
    a = 1
    for i in range(1,n+1):
        a *= i
        a %= m
    A = pow(a,m-2,m)
    
    
    b= copy.deepcopy(A)   
    for i in range(n,r,-1):
        b = (b*i)%m
    
    c = copy.deepcopy(A)
    for i in range(n,n-r,-1):
        c = (c*i)%m
       
    return (a*b*c)%m

ans = m*pow(m-1,n-1,mod)
ans %= mod
#print(ans)
p = pow(m-1,n-k-2,mod)
#com(n-1,i,mod)
c = com(n-1,k+1,mod)
#print(c)
for i in range(k,0,-1):
    p *= (m-1)
    p %= mod
    c *= (i+1)
    c *= pow(n-i-1,mod-2,mod)
    c %= mod
    ans += m * p * c
    ans %= mod
    #print(m-1,i,mod)
    #print(ans)
print(ans)
from functools import gcd

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

a = A[0]
for i in range(1, n):
    a = gcd(a, A[i])

print(a)


### FIXED CODE ###

from fractions import gcd

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

a = A[0]
for i in range(1,n):
    a=gcd(a, A[i])

print(a)
n, m = map(int, input().split())
s = ""
[s += input() for i in range(0, m)]
[print(s.count(str(i))) for i in range(1, m + 1)]


### FIXED CODE ###

n, m = map(int, input().split())
info = list()
for i in range(0, n + 1):
    info.append(0)
for i in range(0, m):
    a, b = map(int, input().split())
    info[a] = info[a] + 1
    info[b] = info[b] + 1
for i, value in enumerate(info):
    if i is not 0:
        print(value)
N=int(input())

N_sum=list(range(N))
print(sum(N_sum))

### FIXED CODE ###

N=int(input())
print(int(N*(N-1)//2))
chokudai
chokudaiz


### FIXED CODE ###

s=str(input())
t=str(input())
if s==t[:len(s)]:
    print('Yes')
else:
    print('No')
import math
while True:
    t=input()
    if t == "":break
    l=t.split()
    px=sum(l[0::2])/3
    py=sum(l[1::2])/3
    r=math.sqrt((l[0]-px)**2+(l[1]-py)**2)
    print("{0} {1} {2}".format([round(i,3) for i in[px,py,r]]))


### FIXED CODE ###

import math
n=int(input())
for i in range(n):
    x1,y1,x2,y2,x3,y3=[float(i) for i in input().split()]
    A=math.hypot(x2-x3,y2-y3)**2
    B=math.hypot(x1-x3,y1-y3)**2
    C=math.hypot(x1-x2,y1-y2)**2
    t1=A*(B+C-A)
    t2=B*(A+C-B)
    t3=C*(A+B-C)
    px=(t1*x1+t2*x2+t3*x3)/(t1+t2+t3)
    py=(t1*y1+t2*y2+t3*y3)/(t1+t2+t3)
    r=math.hypot(px-x1,py-y1)
    print("%.3f %.3f %.3f"%(round(px,3),round(py,3),round(r,3)))
import math
n,X=map(int, input().split())
x=list(map(int, input().split()))
ans=abs(x[0]-X)
for xi in x[1:]:
    ans=math.gcd(ans, abs(xi-X))
print(ans)

### FIXED CODE ###

from fractions import gcd
n,X=map(int, input().split())
x=list(map(int, input().split()))
ans=abs(x[0]-X)
for xi in x[1:]:
    ans=gcd(ans, abs(xi-X))
print(ans)
li=[]
li2=[]
ans=0
for i in 5:
  li.append(int(input()))
for i in 5:
  li2.append=(li[i]-1)%10
for i in 5:
  ans+=(li[i]//10)*10
print(ans+min(li2)+1)

### FIXED CODE ###

li=[]
li2=[]
ans=0
for i in range(5):
  li.append(int(input()))
for i in range(5):
  li2.append((li[i]-1)%10)
for i in range(5):
  ans+=((li[i]-1)//10)*10
print(ans+min(li2)+41)
a, b, c = (i for i in input().split())
if ord(a) + ord(b) + ord(c) == ord('a') + ord('b') + ord('c'):
  print('Yes')
else:
  print('No')

### FIXED CODE ###

s = input()
na = 0
nb = 0
nc = 0

for c in s:
  if c == 'a': na += 1
  if c == 'b': nb += 1
  if c == 'c': nc += 1

if na == nb == nc:
  print('Yes')
else:
  print('No')
a, b, h = map(int,input().split())
print(((a+b)*h)//2)

### FIXED CODE ###

a = int(input())
b = int(input())
h = int(input())
print(((a+b)*h)//2)
a,b = map(int,input().split())
ans = 1
c = a-1
while a < b:
  a += c
  ans += 1
print(ans) 


### FIXED CODE ###

S = input()
T = input()
ans = 0
for i in range(3):
    if T[i] == S[i]:
        ans +=1
print(ans)
import numpy as np

N,M=list(map(int, input().split()))
A=[]
ret=[]
T=[[1,1,1],[1,1,-1],[1,-1,1],[-1,1,1],[1,-1,-1],[-1,1,-1],[-1,-1,1],[-1,-1,-1]]
for i in range(N):
    l=list(map(int, input().split()))
    l.append(0)
    A.append(l)

def Score(a):
    return abs(a[0])+abs(a[1])+abs(a[2])

for t in T:
    for a in A:
        a[3]=a[0]*t[0]+a[1]*t[1]+a[2]*t[2]
    A.sort(key=lambda x:x[3],reverse=True)
    score=0
    for _ in range(M):
        score+=A[_][3]
    ret.append(score)
ret.sort(reverse=True)
print(ret[0])

### FIXED CODE ###

import numpy as np

N,M=list(map(int, input().split()))
A=[]
ret=[]
T=[[1,1,1],[1,1,-1],[1,-1,1],[-1,1,1],[1,-1,-1],[-1,1,-1],[-1,-1,1],[-1,-1,-1]]
for i in range(N):
    l=list(map(int, input().split()))
    l.append(0)
    A.append(l)

def Score(a):
    return abs(a[0])+abs(a[1])+abs(a[2])

for t in T:
    for a in A:
        a[3]=a[0]*t[0]+a[1]*t[1]+a[2]*t[2]
    A.sort(key=lambda x:x[3],reverse=True)
    score=0
    for _ in range(M):
        score+=A[_][3]
    ret.append(score)
ret.sort(reverse=True)
print(ret[0])
S = input()
N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+3)//2-1:]


def isloop(S):
    i = 0
    N = len(S)
    if i == N-1-i:
        return True
    while S[i] == S[N-1-i]:
        i += 1
        if i == N-1-i:
            return True
    return False


if isloop(S) and isloop(S1) and isloop(S2):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

S = input()
N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+3)//2-1:]


def isloop(S):
    i = 0
    N = len(S)
    if i == N-1-i:
        return True
    while S[i] == S[N-1-i]:
        i += 1
        if i == N-1-i or i == N-i:
            return True
    return False


if isloop(S) and isloop(S1) and isloop(S2):
    print("Yes")
else:
    print("No")
N = int(input())
A = int(input())
C = 0
C = N % 500
if C <= A:
   print(Yes)
else:
   print(No)

### FIXED CODE ###

N = int(input());
A = int(input());
C = 0;
C = N % 500;
if C <= A:
  print("Yes");  
else:
  print("No");
N = int(input())
num = N[-1]
 
if num == 3:
  print('bon')
elif num == 0 or num == 1 or num == 6 or num == 8:
  print('pon')
else:
  print('hon')

### FIXED CODE ###

N = str(input())
num = N[-1]
num = int(num)
 
if num == 3:
  print('bon')
elif num == 0:
  print('pon')
elif num == 1:
  print('pon')
elif num == 6:
  print('pon')
elif num == 8:
  print('pon')
elif num ==2:
  print('hon')
elif num == 4:
  print('hon')
elif num==5:
  print('hon')
elif num==7:
  print('hon')
elif num==9:
  print('hon')
import bisect
s=input()
t=input()
dic={}
for i in range(len(t)):
  if t[i] in dic:
    continue
  if t[i] not in dic:
    dic[t[i]]=[]
for i in range(len(s)):
  if s[i] in dic:
    dic[s[i]].append(i)
n=-1
k=0

for i in range(len(t)):
  l=bisect.bisect_right(dic[t[i]],n)
  if l<len(dic[t[i]]):
    n=dic[t[i]][l]
  else:
    n=dic[t[i]][0]
    k+=1
print(len(s)*k+n+1)

### FIXED CODE ###

import bisect
s=input()
t=input()
dic={}
for i in range(len(t)):
  if t[i] in dic:
    continue
  if t[i] not in dic:
    dic[t[i]]=[]
for i in range(len(s)):
  if s[i] in dic:
    dic[s[i]].append(i)
for k,v in dic.items():
  if v==[]:
    print(-1)
    exit()
n=-1
k=0

for i in range(len(t)):
  l=bisect.bisect_right(dic[t[i]],n)
  if l<len(dic[t[i]]):
    n=dic[t[i]][l]
  else:
    n=dic[t[i]][0]
    k+=1
print(len(s)*k+n+1)
import math
n = int(input())

def order(a,b):
    return max(len(str(int(a))),len(str(int(b))))
    
ans = [] 


for i in range(1,int(math.ceil(math.sqrt(n)))):
    if n % i == 0:
        ans.append(order(n/i,i))

print(min(ans))

### FIXED CODE ###

import math
n = int(input())

def order(a,b):
    return max(len(str(int(a))),len(str(int(b))))
    
ans = [] 


for i in range(1,int(math.ceil(math.sqrt(n)))+1):
    if n % i == 0:
        ans.append(order(n/i,i))

if len(ans) == 0:
    print(1)
else:
    print(min(ans))
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
import numpy as np
 
K = INT()
sum = 0
 
for n in range(K):
  for m in range(K):
    for l in range(K):
      sum += gcd(n+1, gcd(m+1, l+1))
 
print(sum)

### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
 
K = INT()
sum = 0
 
for n in range(K):
  for m in range(K):
    for l in range(K):
      sum += gcd(n+1, gcd(m+1, l+1))
 
print(sum)
# スペース区切りの整数の入力
p,q,r = map(int, input().split())

# 出力
Print(p+q+r-max(p, q, r))


### FIXED CODE ###

p,q,r=map(int,input().split())
print(p+q+r-max(p,q,r))
N = int(input())
cnt = 0
for _ in range(N):
    a,b = map(int,input().split())
    cnt += (a-b)%a
print(cnt)    

### FIXED CODE ###

N = int(input())
cnt = 0
A = []
B = []
C = []
for _ in range(N):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)
    C.append((b-a)%b) 
cnt = C[-1]
for i in range(-2,-N-1,-1):
    C[i] = (C[i]-cnt)%B[i]
    cnt += C[i]
print(cnt)
import math

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

n = (int)(input())
a = list(map(int, input().split(" ")))
temp = []
for i in range(n):
  temp.append(a.count(i))
  
ans = 0
#print(temp)#各数字の出現回数
for i in range(n):
  if temp[i] >= 2:
    ans += comb(temp[i], 2)
    
#print(ans)#ansは全体の組み合わせの合計。割れない

for i in range(n):
  kotae = ans
  if temp[a[i]] >= 3:
    #print(ans, comb(temp[a[i]], 2), comb(temp[a[i]] - 1, 2))
    kotae = ans - comb(temp[a[i]], 2) + comb(temp[a[i]] - 1, 2)
  elif temp[a[i]] == 2:
    kotae = ans -1
  print(kotae)

### FIXED CODE ###

n = (int)(input())
a = list(map(int, input().split(" ")))
temp = [0 for i in range(n + 1)]
aaa = sorted(a)
count = 0
for i in range(n - 1):
  if aaa[i] == aaa[i + 1]:
    count+= 1
  else:
    temp[aaa[i]] = count + 1
    count = 0
else:
  if len(a) == 1:
    temp[aaa[0]] = 1
  else:
    temp[aaa[-1]] = count + 1
ans = 0

#---ここまで231ms

#print(temp)#各数字の出現回数
for i in range(n + 1):
  if temp[i] >= 2:
    ans += temp[i] * (temp[i] - 1) / 2
    
#---ここまでで1553ms

#print(ans)#ansは全体の組み合わせの合計。割れない

for i in range(n):
  kotae = ans
  if temp[a[i]] >= 3:
    #print(ans, comb(temp[a[i]], 2), comb(temp[a[i]] - 1, 2))
    #print(temp[a[i]], i)
    kotae = ans - (temp[a[i]] * (temp[a[i]] - 1) / 2) + ((temp[a[i]] - 1) * (temp[a[i]] - 2) / 2)
  elif temp[a[i]] == 2:
    kotae = ans -1
  print((int)(kotae))
n = int(input())
r = int(input())
 
if n < 10:
  print(n-(100*(10-r)))
else:
  print(n)


### FIXED CODE ###

n,r = map(int,input().split())
 
if n < 10:
  print(r+(100*(10-n)))
else:
  print(r)
A,B = map(int,input().split())

if B%A == 0
	print(A+B)
else:
  	print(A=B)

### FIXED CODE ###

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

if B%A == 0:
	print(A+B)
else:
  	print(B-A)
import collections
i,j = 0,0 
q = collections.deque([])
while(j < len(s)):
	while(s[j] == s[i]): j+=1
	q.append(j - i - 1)
	j = i

#5 6 5 1 1 4 2 1 1 1 1 1
ns = len(s)
while(len(q) > 1):
	u,v = q.popleft(), q.popleft()
	if q: q[0] += abs(u-v)
print ns - (q[0] if q else 0)


### FIXED CODE ###

import collections

s = raw_input()
stack = collections.deque([])
i = 0
j = 0
while(j < len(s)):
	while(j < len(s) and s[i] == s[j]): j += 1	
	stack.append(j-i)
	i = j
n = len(s)
while(len(stack) > 1) :
	v = stack.pop()
	u = stack.pop()
	if v > u: 
		if stack:
			stack[-1] += v-u
		else:
			stack.append(v-u)
	elif v < u: stack.append( u - v)

print n - (stack[-1] if stack else 0)
f = list(map(int, input().split()))
s = list(map(int, input().split()))
t = list(map(int, input().split()))
n = int(input())
k = []
for i in range(n):
    k.append(int(input()))

lis = []

lis.append(f)
lis.append(s)
lis.append(t)

ans = 0

for i in lis:
    c =0
    for n in range(len(i)):
        if i[n] in k:
            i[n] = 'X'
            c += 1
            if c == 3:
                ans +=1
                break

if f[0] == 'X' and s[0] == 'X' and t[0] == 'X':
    ans +=1
elif f[1] == 'X' and s[1] == 'X' and t[1] == 'X':
    ans += 1
elif f[2] == 'X' and s[2] == 'X' and t[2] == 'X':
    ans += 1
elif f[0] == 'X' and s[1] == 'X' and t[3] == 'X':
    ans += 1
elif f[2] == 'X' and s[1] == 'X' and t[0] == 'X':
    ans += 1
    
if ans >= 1:
    print('Yes')
elif ans == 0:
    print('No')
        

### FIXED CODE ###

f = list(map(int, input().split()))
s = list(map(int, input().split()))
t = list(map(int, input().split()))
n = int(input())
k = []
for i in range(n):
    k.append(int(input()))

lis = []

lis.append(f)
lis.append(s)
lis.append(t)

ans = 0

for i in lis:
    c =0
    for n in range(len(i)):
        if i[n] in k:
            i[n] = 'X'
            c += 1
            if c == 3:
                ans +=1
                break

if f[0] == 'X' and s[0] == 'X' and t[0] == 'X':
    ans +=1
elif f[1] == 'X' and s[1] == 'X' and t[1] == 'X':
    ans += 1
elif f[2] == 'X' and s[2] == 'X' and t[2] == 'X':
    ans += 1
elif f[0] == 'X' and s[1] == 'X' and t[2] == 'X':
    ans += 1
elif f[2] == 'X' and s[1] == 'X' and t[0] == 'X':
    ans += 1
    
if ans >= 1:
    print('Yes')
elif ans == 0:
    print('No')
N = int(input())
L = list(map(int,input().split()))
print(L)


ans = 0

for i in range(len(L)):
    for j in range(i+1,len(L)):
        for k in range(j+1,len(L)):
            #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
            if L[i]+L[j] > L[k] and L[j]+L[k] > L[i] and L[k]+L[i] > L[j] and L[i] != L[j] and L[j] != L[k] and L[k] != L[i]:
                #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
                ans += 1

prinr(ans)

### FIXED CODE ###

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



ans = 0

for i in range(len(L)):
    for j in range(i+1,len(L)):
        for k in range(j+1,len(L)):
            #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
            if L[i]+L[j] > L[k] and L[j]+L[k] > L[i] and L[k]+L[i] > L[j] \
            and L[i] != L[j] and L[j] != L[k] and L[k] != L[i]:
                #print("L[i]:",L[i],"L[j]:",L[j],"L[k]:",L[k])
                ans += 1

print(ans)
import math
n,x=map(int,input().split())
xlist=list(map(int,input().split()))
xlist.sort(key=lambda xx:abs(xx-x))
for i in range(n):
    xlist[i]-=x
    xlist[i]=abs(xlist[i])
m=xlist[-1]
while xlist!=[0]*n:
    for i in range(n):
        
        xlist[i]%=m
        if xlist[i]>0:
            m=math.gcd(m,xlist[i])
print(m)

### FIXED CODE ###

def gcd(x,y):
    while x%y:
        x%=y
        x,y=(y,x)
    return y
n,x=map(int,input().split())
xlist=list(map(int,input().split()))
xlist.sort(key=lambda xx:abs(xx-x))
for i in range(n):
    xlist[i]-=x
    xlist[i]=abs(xlist[i])
m=xlist[-1]
while xlist!=[0]*n:
    for i in range(n):
        
        xlist[i]%=m
        if xlist[i]>0:
            m=gcd(m,xlist[i])
print(m)
n = int(input())
l = [1]*(n+1)
l[0] = 0
ans = l[1]

for i in range(2,n+1):
    for j in range(i,n+1,i):
        l[j] += 1

    ans += (l[i]*i)
return ans



print(ans)


### FIXED CODE ###

from numba import njit
@njit("i8(i8)")

def f(n):

    
    l = [1]*(n+1)
    l[0] = 0
    ans = l[1]
    for i in range(2,n+1):
        for j in range(i,n+1,i):
            l[j] += 1

        ans += (l[i]*i)
    return ans

n = int(input())
print(f(n))
n = input()
if n<100 or n>999:
    n = 107
x = len(n)
for i in range(x):
    if n[i] is '7':
        print('Yes')
        break

### FIXED CODE ###

n = input()
x = len(n)
b = 'false'
for i in range(x):
    if n[i] is '7':
        b = 'true'
        print('Yes')
        break
if b is not 'true':
  print('No')