Harryxun/stf_run huggingface dataset:
#最大公約数を求める再帰関数-->計算量O(log(max(x))
def gcd(x, y):
    if x < y:
        x, y = y, x
    if y == 0:
        return x
    return gcd(x-y, y)


#本文
N = int(input())
list_A = list(map(int, input().split()))

#配列初期化
list_gcd = [0] * N
list_gcd_rev = [0] * N

#以下　間違いを発見できず

##配列の最初のgcdを求める。定義
#list_gcd[0] = list_A[0]
#list_gcd_rev[N-1] = list_A[N-1]
##print (list_gcd, list_gcd_rev)

##配列にgcdを代入していく
#for i in range(1,N):
#    list_gcd[i] = gcd(list_gcd[i-1], list_A[i])
##print (list_gcd)
#for j in range(1,N):
#    list_gcd_rev[N-1-j] = gcd(list_gcd_rev[N-j], list_A[N-1-j])
##print (list_gcd_rev)

##print (list_gcd, list_gcd_rev)

##k番目までの両端からのgcdを求める
#if N == 2:
#    ans = gcd(list_gcd[0], list_gcd_rev[1])
#else:
#    ans = max(list_gcd[N-2], list_gcd_rev[1]) #両端の文字を除いたときの答え
##print (ans)
#for k in range(1,N-1):
#    a = list_gcd[k-1]
#    b = list_gcd_rev[k+1]
#    ans = max(ans, gcd(a, b))
#print (ans)

#以下、正答

for i in range(1,N):
    list_gcd[i]=gcd(list_gcd[i-1],list_A[i-1])
for i in range(N-1)[::-1]:
    list_gcd_rev[i]=gcd(list_gcd_rev[i+1],list_A[i+1])
Z = [gcd(list_gcd[i], list_gcd_rev[i]) for i in range(N)]
print (max(Z))

### FIXED CODE ###

#最大公約数を求める再帰関数-->計算量O(log(max(x))
def gcd1(x, y):
    if x < y:
        x, y = y, x
    if y == 0:
        return x
    return gcd(x-y, y)

def gcd(x,y):
    if x<y:
        x,y=y,x
    #x>y
    if y==0:
        return x
    if x%y==0:
        return y
    else:
        return gcd(y,x%y)


#本文
N = int(input())
list_A = list(map(int, input().split()))

#配列初期化
list_gcd = [0] * N
list_gcd_rev = [0] * N

#以下　間違いを発見できず

##配列の最初のgcdを求める。定義
#list_gcd[0] = list_A[0]
#list_gcd_rev[N-1] = list_A[N-1]
##print (list_gcd, list_gcd_rev)

##配列にgcdを代入していく
#for i in range(1,N):
#    list_gcd[i] = gcd(list_gcd[i-1], list_A[i])
##print (list_gcd)
#for j in range(1,N):
#    list_gcd_rev[N-1-j] = gcd(list_gcd_rev[N-j], list_A[N-1-j])
##print (list_gcd_rev)

##print (list_gcd, list_gcd_rev)

##k番目までの両端からのgcdを求める
#if N == 2:
#    ans = gcd(list_gcd[0], list_gcd_rev[1])
#else:
#    ans = max(list_gcd[N-2], list_gcd_rev[1]) #両端の文字を除いたときの答え
##print (ans)
#for k in range(1,N-1):
#    a = list_gcd[k-1]
#    b = list_gcd_rev[k+1]
#    ans = max(ans, gcd(a, b))
#print (ans)

#以下、正答

for i in range(1,N):
    list_gcd[i]=gcd(list_gcd[i-1],list_A[i-1])
for i in range(N-1)[::-1]:
    list_gcd_rev[i]=gcd(list_gcd_rev[i+1],list_A[i+1])
Z = [gcd(list_gcd[i], list_gcd_rev[i]) for i in range(N)]
print (max(Z))
print __file__

### FIXED CODE ###

_=int(input());c=0
for i in 'i¥½ÃÉ':
  if (_ < ord(i)):
    print(c)
    break
  c+=1
import math

def main():
    data = []
    while 1:
        try:
            n = input().split()
            a = int(n[0])
            b = int(n[1])
            ans = int(math.log10(a+b)+1)
            data.append(ans)
        except IndexError:
            #EOF
            break

        for i in data:
            print(i)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import math

def main():
    data = []
    while 1:
        try:
            n = input().split()
            a = int(n[0])
            b = int(n[1])
            ans = int(math.log10(a+b)+1)
            data.append(ans)
        except EOFError:
            break

    for i in data:
        print(i)

if __name__ == "__main__":
    main()
A_1 = list(map(int, input().split()))
A_2 = list(map(int, input().split()))
A_3 = list(map(int, input().split()))
N = int(input())
b = [list(map(int, input().split()))for _ in range(N)]
for i in range(3):
    for j in range(N):
        if A_1[i] == b[j][0]:
            A_1[i] = "a"
        elif A_2[i] == b[j][0]:
            A_2[i] = "a"
        elif A_3[i] == b[j][0]:
            A_3[i] = "a"
        else:
            pass
if A_1[0] == A_1[1] == A_1[2] or A_2[0] == A_2[1] == A_2[2] or A_3[0] == A_3[1] == A_3[2] or A_1[0] == A_2[0] == A_3[0] or A_1[1] == A_2[1] == A_3[1] or A_1[2] == A_2[2] == A_3[3] or A_1[0] == A_2[1] == A_3[2] or A_1[2] == A_2[1] == A_3[0]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

A_1 = list(map(int, input().split()))
A_2 = list(map(int, input().split()))
A_3 = list(map(int, input().split()))
N = int(input())
b = [(int(input())) for _ in range(N)]
for i in range(3):
    for j in range(N):
        if A_1[i] == b[j]:
            A_1[i] = 1
        elif A_2[i] == b[j]:
            A_2[i] = 1
        elif A_3[i] == b[j]:
            A_3[i] = 1


if A_1[0] == A_1[1] == A_1[2]:
    print("Yes")
elif A_2[0] == A_2[1] == A_2[2]:
    print("Yes")
elif A_3[0] == A_3[1] == A_3[2]:
    print("Yes")
elif A_1[0] == A_2[0] == A_3[0]:
    print("Yes")
elif A_1[1] == A_2[1] == A_3[1]:
    print("Yes")
elif A_1[2] == A_2[2] == A_3[2]:
    print("Yes")
elif A_1[0] == A_2[1] == A_3[2]:
    print("Yes")
elif A_1[2] == A_2[1] == A_3[0]:
    print("Yes")
else:
    print("No")
n = int(input())
b = list(map(int, input().split()))
a = [b[0]]
for i in range(1, n):
    if a[-1] != b[i]:
        a.append(b[i])

ans = 1
inc = a[0] < a[1]

n = len(a)
for i in range(1, n):
    if (a[i-1] > a[i]) ^ inc:
        pass
    else:
        ans += 1
        inc = not inc
print(ans)

### FIXED CODE ###

n = int(input())
b = list(map(int, input().split()))
a = [b[0]]
for i in range(1, n):
    if a[-1] != b[i]:
        a.append(b[i])

ans = 1
inc = a[0] < a[min(1, n-1)]

n = len(a)
i = 1
while i < n:
    if (a[i-1] < a[i]) ^ inc:
        ans += 1
        inc = a[i] < a[min(i+1, n-1)]
        i += 2
    else:
        i += 1
print(ans)
n = int(input())
a = map(int, input().split())

count = 0
flag = True

while(flag):
    tmp_a = []
    for i in a:
        if i % 2 !=0:
            flag = False
            break
        tmp_a.append(i/2)
    a = tmp_a
    if flag == True:
        count += 1

print(count)

### FIXED CODE ###

str = input()
 
count = 0
if str[0] == "1":
  count+=1
if str[1] == "1":
  count+=1
if str[2] == "1":
  count+=1
 
print(count)
n = int(input())
for i in range(10**3):
    if n == i*(i+1)//2:
        x = i
        break
else:
    print("No")
    exit()
ans = [[] for i in range(x+1)]
app = 0
for i in range(1,x+1):
    for j in range(i):
        app += 1
        ans[j].append(app)
    ans[i].extend([k for k in range(i*(i-1)//2+1,i*(i+1)//2+1)])
print("Yes")
print(x+1)
for ansarr in ans:
    print(x, *ansarr, sep = " ")

### FIXED CODE ###

s=input()
if len(s) == 2:
  print(s)
else:
  print(s[::-1])
n=int(inout())
l=[]
for i in range(1,n,1):
    if n%i==0 and n/i>=i:
        a=i+(n/i)
        l.append(a)
        
c=int(min(l))
print(c-2)

### FIXED CODE ###

import numpy as np
n=int(input())
m=int(np.ceil(np.sqrt(n)))+1
l=[]

for i in range(1,m,1):
    if n%i==0:
        a=i+(n/i)
        l.append(a)
        
c=int(min(l))
print(c-2)
NK = input().split();
N,K = int(NK[0]),int(NK[1]);
min = N;

#桁が大きい時の処理
if(K == 1):
    while(int(len(str(N))) > 2):
        N = int(N - K * (N / 2));
else:
    border = math.floor(N / K);
    N = N - K * border;
        
flag = True;
while flag == True:
    N = abs(N - K);
    if(N <= min):
        min = N;
    else:
        flag = False;
    
print(min);

### FIXED CODE ###

import math

NK = input().split();
N,K = int(NK[0]),int(NK[1]);
min = N;

#桁が大きい時の処理
if(K == 1):
    while(int(len(str(N))) > 2):
        N = int(N - K * (N / 2));
else:
    border = math.floor(N / K);
    N = N - K * border;
        
flag = True;
while flag == True:
    N = abs(N - K);
    if(N <= min):
        min = N;
    else:
        flag = False;
    
print(min);
N = int(input())
S = input()
m = 0
p = 0
for i in S:
  if i == D:
    p -= 1
  else:
    p += 1
  if p >= m:
    m = p
print(m)

### FIXED CODE ###

N = int(input())
S = input()
m = 0
p = 0
for i in S:
  if i == "D":
    p -= 1
  else:
    p += 1
  if p >= m:
    m = p
print(m)
i = 1
while True:
    x = int(input())
    if x == 0: break
    print("Case {}: {}".format(i, n))
    i += 1

### FIXED CODE ###

i = 1
while True:
    x = int(input().strip())
    if x == 0:
        break
    else:
        print ("Case {}: {}".format(i,x))
        i += 1
l = map(int, input().split())

a = l[0]*l[1]
b = (l[0]+l[1])*2

print(a b)

### FIXED CODE ###

n = map(int,raw_input().split())
print n[0]*n[1] , 2*(n[0]+n[1])
#N,Mとa_1からb_Mまで入力
N,M = map(int,input().split())
list1 = [input() for i in range(1,2M+1)]
for i in range(M):
    list1.append(map(int,input() .split()))
    
#print list.count(l) for文で0から2M-1まで
for l in range(1,N+1):
    print(list1.count(l))

### FIXED CODE ###

A,B,C = map(int,input().split())
if C >= A and C<= B:
    print("Yes")
else:
    print("No")
s = input()
k = int(input())

ok = True
for a in range(k):
    if int(s[a]) != 1:
        print(s[a])
        ok = False
        break

if ok:
    print(s[k])

### FIXED CODE ###

s = input()
k = int(input())
end = False
for i in range(min(len(s), k)):
    if s[i] != '1':
        print(s[i])
        end = True
        break
if end == False:
    print(1)
k,s=map(int,input().split())
res=0
for i in range(k+1):
  for j in range(K+1):
    if 0<=s-i-j and s-i-j<=k:res+=1
print(res)

### FIXED CODE ###

k,s=map(int,input().split())
res=0
for i in range(k+1):
  for j in range(k+1):
    if 0<=s-i-j and s-i-j<=k:res+=1
print(res)
from collections import Counter
N = int(input())
l = []
pql = []
for i in range(N):
        x, y = map(int, input().split())
        l.append((x,y))
for i in range(N-1):
        for j in range(1, N-i):
                p = l[i+j][0] - l[i][0]
                q = l[i+j][1] - l[i][1]
                pql.append((p,q))
pq = Counter(pql)
cntl = pq.most_common(1)
cnt = cntl[0][1]
print(N - cnt)

### FIXED CODE ###

from collections import Counter
N = int(input())
l = []
pql = []
for i in range(N):
        x, y = map(int, input().split())
        l.append((x,y))
l.sort()
for i in range(N-1):
        for j in range(1, N-i):
                p = int(l[i+j][0] - l[i][0])
                q = int(l[i+j][1] - l[i][1])
                pql.append((p,q))
pq = Counter(pql)
cntl = pq.most_common(1)
if N == 1:
        print(1)
else:
        cnt = cntl[0][1]
        print(N - cnt)
N, K = map(int, input())
if N % K == 0:
  print(0)
else:
  print(1)

### FIXED CODE ###

N, K = map(int, input().split())
if N % K == 0:
  print(0)
else:
  print(1)
a,b,c = input().split()
 
a = int(a)
b = int(b)
c = int(c)
 
 
if(a + b + c) != 17:
  print("NO")
elif(a + b + c) = 17:
    if(a + b == 10) | (b + c == 10) | (c + a == 10):
      print("YES")
    else:
      print("NO")
else:
  print("NO")

### FIXED CODE ###

a,b,c = input().split()
 
a = int(a)
b = int(b)
c = int(c)
 
 
if(a + b + c) != 17:
  print("NO")
elif(a + b + c) == 17:
    if(a + b == 10) | (b + c == 10) | (c + a == 10):
      print("YES")
    else:
      print("NO")
else:
  print("NO")
A = input().split()
count = 0
flag = True

while flag:
  fot i in range(N):
    if A[i] % 2 != 0:
      flag = False
      break
  if !flag:
    print(count)
  count += 1
  A[i] = A[i] / 2
   


### FIXED CODE ###

N = int(input())
A = [int(s) for s in input().split()]
count = 0
flag = True

while flag:
  for i in range(N):
    if A[i] % 2 != 0:
      flag = False
      break
  if flag == False:
    print(count)
  count += 1
  for i in range(N):
    A[i] = A[i] / 2
import collections
from scipy import special

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

for i in range(0, n):
    target_list = num_list[0:i] + num_list[i+1:]
    target_items = collections.Counter(target_list).items()
    ans = 0

    for item in target_items:
        if item[1] > 1:
            ans += special.comb(item[1], 2, True)

    print(ans)


### FIXED CODE ###

import collections

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

cnt = collections.Counter(num_list)
ttl = 0
for v in cnt.values():
    ttl += v*(v-1)//2
for a in num_list:
    print(ttl - (cnt[a] - 1))
from math import pi
r=(int, input())
print("{0:.5f} {1:.5f}".format(pi*r*r, 2*pi*r))

### FIXED CODE ###

from math import pi
r=float(input())
print("{0:.5f} {1:.5f}".format(pi*r*r, 2*pi*r))
n = int(input())
d_lis = list(map(int,input().split()))
li = sorted(d_lis)
mid = n // 2
print(li[mid] - li[mid-1n = int(input())
d_lis = list(map(int,input().split()))
li = sorted(d_lis)
mid = n // 2
print(li[mid] - li[mid-1])

### FIXED CODE ###

n = int(input())
d_lis = list(map(int,input().split()))
li = sorted(d_lis)
mid = n // 2
print(li[mid] - li[mid-1])
m=0
def merge(a,left,mid,right):
    n1=mid-left
    n2=right-mid
    el=range(0,n1+1)
    ar=range(0,n2+1)
    for i in range(n1):
        el[i]=a[left+i]
    for i in range(n2):
        ar[i]=a[mid+i]
    el[n1]=float("inf")
    ar[n2]=float("inf")
    i=0
    j=0
    for k in range(left,right):
        global m
        m+=1
        if(el[i] <= ar[j]):
            a[k] = el[i]
            i=i+1
        else:
            a[k]=ar[j]
            j=j+1

def merge_sort(a,left,right):
    if(left+1<right):
        mid=(left+right)//2
        merge_sort(a,left,mid)
        merge_sort(a,mid,right)
        merge(a,left,mid,right)
    else:
        if(a[left]>a[right-1]):
            a[left],a[right-1]=a[right],a[left]



n=int(input())
s=input()
a=list(map(int,s.split()))
merge_sort(a,0,n)
a=map(str,a)
print(" ".join(list(a)))
print(m)
    

### FIXED CODE ###

m=0
def merge(a,left,mid,right):
    n1=mid-left
    n2=right-mid
    el=a[left:mid]
    ar=a[mid:right]
    el.append(float("inf"))
    ar.append(float("inf"))
    i=0
    j=0
    for k in range(left,right):
        global m
        m+=1
        if(el[i] <= ar[j]):
            a[k] = el[i]
            i=i+1
        else:
            a[k]=ar[j]
            j=j+1

def merge_sort(a,left,right):
    if(left+1<right):
        mid=(left+right)//2
        merge_sort(a,left,mid)
        merge_sort(a,mid,right)
        merge(a,left,mid,right)
    else:
        if(a[left]>a[right-1]):
            a[left],a[right-1]=a[right],a[left]



n=int(input())
s=input()
a=list(map(int,s.split()))
merge_sort(a,0,n)
a=map(str,a)
print(" ".join(list(a)))
print(m)
from math import asin, atan, pi

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

if x >= a * a * b / 2:
  print(atan((a*a*b-x)/(a*a*a)*2)/(2 * pi)*360)
else:
  print(90 - asin(x/(a*b*b/2))/(2 * pi)*360)

### FIXED CODE ###

from math import atan, pi

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

if x == a * a * b:
  print(0)
elif x >= a * a * b / 2:
  print(atan((a*a*b-x)/(a*a*a)*2)/(2 * pi)*360)
else:
  print(90 - atan(x/(a*b*b/2))/(2 * pi)*360)
n = int(input())
s = input()
ans = 0
for i in range(1000):
    c = [i // 100, (i // 10) % 10, i % 10]
    digit = 0
    for j in s:
        if c[digit] == int(j):
            digit+=1
        if digit == 3:
            break
    if digit == 3:
        ans += 1
print(ans)

### FIXED CODE ###

m1,d1 = map(int,input().split())
m2,d2= map(int,input().split())
print(1) if d2 == 1 else print(0)
# -*- coding: utf-8 -*-

a = int(input())
b = int(input())
if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(':(')


### FIXED CODE ###

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

a, b = map(int, input().split())
if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(':(')
y,m,d=input().split()
y=2018
print(y+"/"+m+"/"+d)

### FIXED CODE ###

y,m,d=input().split("/")
y=str(2018)
print(y+"/"+m+"/"+d)
N = int(input())
S,T = input().split()
A = []
B = []
A = list(S)
B = list(T)
for i in range(N)
	print(A[i],B[i], end='')
	

### FIXED CODE ###

N = int(input())
Slist = input().split()
A = Slist[0]
B = Slist[1]

for i in range (N):
	print(A[i],B[i], end='',sep='')
S = input()

if S = "ABC":
    print("ARC")
else:
    print("ABC")


### FIXED CODE ###

S = input()

if S == "ABC":
    print("ARC")
else:
    print("ABC")
n, q = map(int, input().split())
g = [[] for i in range(n+1)]
c = [0 for i in range(n+1)]
ans = [0 for i in range(n+1)]
for i in range(n-1):
    a, b = map(int, input().split())
    g[a].append(b)
    g[b].append(a)
for i in range(q):
    p, x = map(int, input().split())
    c[p] += x

def dfs(now, fro, point):
    point += c[now]
    ans[now] = point
    for i in g[now]:
        if i==int(fro):
            continue
        dfs(i, now, point)

dfs(1, -1, 0)
for i in range(1, n+1):
    print(ans[i], end='')
    if i!=n:
        print(' ', end='')


### FIXED CODE ###

def main():
    from collections import deque
    n, q = map(int, input().split())
    g = [[] for i in range(n+1)]
    point = [0 for i in range(n+1)]
    for i in range(n-1):
        a, b = map(int, input().split())
        g[a].append(b)
        g[b].append(a)
    for i in range(q):
        p, x = map(int, input().split())
        point[p] += x

    q = deque([[1,0]])
    for j in range(n):
        now = q.pop()
        point[now[0]] += point[now[1]]
        for i in g[now[0]]:
            if i==now[1]:
                continue
            q.append([i,now[0]])
    for i in range(1, n+1):
        print(point[i], end='')
        if i!=n:
            print(' ', end='')

if __name__ == '__main__':
    main()
R = int(input())
if R < 1200:
  print(ABC)
elif R < 2800:
  print(ARC)
else:
  print(AGC)

### FIXED CODE ###

R = int(input())
if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")
n, m = map(int, input().split())
sc = [list(map(int, input().split())) for i in range(m)]
sc = list(map(list, set(map(tuple, sc))))

l = list()
for i in range(1000):
    i = str(i).zfill(3)
    flg = True
    for j in sc:
        if i[j[0]-1] != j[1]:
            flg = False
    if flg:
        l.append(int(i))

print(min(l))

### FIXED CODE ###

n, m = map(int, input().split())
sc = [list(map(int, input().split())) for i in range(m)]
sc = list(map(list, set(map(tuple, sc))))

ans = [-1] * n
for i in sc:
    if i[0] == 1 and i[1] == 0 and n == 1:
        print(0)
        exit()
    if i[0] == 1 and i[1] == 0:
        print(-1)
        exit()
    if i[0] > n or ans[i[0]-1] != -1:
        print(-1)
        exit()
    ans[i[0]-1] = i[1]

for i, val in enumerate(ans):
    if val == -1:
        ans[i] = 0

if (m == 0 and n != 1) or (ans[0] == 0 and n != 1):
    ans[0] = 1

flg = False
for i in ans:
    if i != 0:
        flg = True
if not flg:
    print(0)
    exit()

ans = map(lambda x: str(x), ans)
print("".join(ans))
S,W = map(int,input().suplit())
if W >= S:
  print("unsafe")
else:
  print("safe")

### FIXED CODE ###

S,W = map(int,input().split())
if W >= S:
  print("unsafe")
else:
  print("safe")
a,b=map(int, input().split())
A = list(map(int, input().split())

sum=0
for at in list:
	sum += at
	
	
if a <= sum:
	print("Yes")
else:
	print("No")

### FIXED CODE ###


a,b=map(int, input().split())
A = list(map(int, input().split()))
sum = 0
for at in A:
	sum += at
	
	
if a <= sum:
	print("Yes")
else:
	print("No")
N,A,B,C = list(map(int, input().split()))
s = [input() for i in range(N)]

ns = [s[0]]
for v in s[1:]:
  if v!=ns[-1]:
    ns.append([v,1])
  else:
    ns[-1][1] += 1

ans = "No"
q = [[] for i in range(N+1)]
q[0] = [(A,B,C)]
q2 = [[] for i in range(N+1)]
q2[0] = [[]]
for i in range(N):
  while q[i]:
    a,b,c = q[i].pop(0)
    trace = q2[i].pop(0)
    if s[i] == "AB":
      if a-1>0 and (a-1,b+1,c) not in q[i+1]:
        q[i+1].append((a-1,b+1,c))
        q2[i+1].append(trace+["B"])
      if b-1>0 and (a+1,b-1,c) not in q[i+1]:
        q[i+1].append((a+1,b-1,c))
        q2[i+1].append(trace+["A"])
    if s[i] == "BC":
      if b-1>0 and (a,b-1,c+1) not in q[i+1]:
        q[i+1].append((a,b-1,c+1))
        q2[i+1].append(trace+["C"])
      if c-1>0 and (a,b+1,c-1) not in q[i+1]:
        q[i+1].append((a,b+1,c-1))
        q2[i+1].append(trace+["B"])
    if s[i] == "AC":
      if a-1>0 and (a-1,b,c+1) not in q[i+1]:
        q[i+1].append((a-1,b,c+1))
        q2[i+1].append(trace+["C"])
      if c-1>0 and (a+1,b,c-1) not in q[i+1]:
        q[i+1].append((a+1,b,c-1))
        q2[i+1].append(trace+["A"])
if q[N]:
  trace = q2[N].pop(0)
  ans = "Yes"


print(ans)
if ans =="Yes":
  for v in trace:
    print(v)
  

### FIXED CODE ###

N,A,B,C = list(map(int, input().split()))
s = [input() for i in range(N)]

u = ["A","B","C"]
ss = ["BC","AC","AB"]
t = [A,B,C]
trace = []
ans = "Yes"
for i in range(N):
  idx = ss.index(s[i])
  if t[(idx+1)%3] == 0 and t[(idx+2)%3] == 0:
    ans = "No"
    break
  elif t[(idx+2)%3] == 0:
    t[(idx+1)%3] -= 1
    t[(idx+2)%3] += 1
    trace.append(u[(idx+2)%3])
  elif t[(idx+1)%3] == 0:
    t[(idx+1)%3] += 1
    t[(idx+2)%3] -= 1
    trace.append(u[(idx+1)%3])
  elif i+1<N and s[i+1] == ss[(idx+1)%3]:
    t[(idx+1)%3] -= 1
    t[(idx+2)%3] += 1
    trace.append(u[(idx+2)%3])
  else:
    t[(idx+1)%3] += 1
    t[(idx+2)%3] -= 1
    trace.append(u[(idx+1)%3])
print(ans)
if ans == "Yes":
  for v in trace:
    print(v)
import argparse

parser = argparse.ArgumentParser()
# パーサーを作る
parser = argparse.ArgumentParser(
            prog='a', # プログラム名
            usage='Count paint number', #プログラムの利用方法
            description='Description', # 引数のヘルプの前に表示
            epilog='end', # 引数のヘルプの後で表示
            add_help=True, # -h/–help オプションの追加
            )
 
# 引数の追加
parser.add_argument('infile', help='inputfile',
                    type=argparse.FileType('r'))
 
# 引数を解析する
args = parser.parse_args()
 
message = args.infile.read()
args.infile.close();

parser.add_argument('arg1', help='input flie name')

a = message[0]
b = message[1]
c = message[2]

if a==b==c:
    print(1)
elif a==b or b==c or a==c:
    print(2)
else:
    print(3)


### FIXED CODE ###

import argparse
from sys import stdin

"""
parser = argparse.ArgumentParser()
# パーサーを作る
parser = argparse.ArgumentParser(
            prog='a', # プログラム名
            usage='Count paint number', #プログラムの利用方法
            description='Description', # 引数のヘルプの前に表示
            epilog='end', # 引数のヘルプの後で表示
            add_help=True, # -h/–help オプションの追加
            )
 
# 引数の追加
parser.add_argument('infile', help='inputfile',
                    type=argparse.FileType('r'))
 
# 引数を解析する
args = parser.parse_args()
 
message = args.infile.read()
args.infile.close();

parser.add_argument('arg1', help='input flie name')

a = message[0]
b = message[1]
c = message[2]
"""

a, b, c = [int(x) for x in stdin.readline().rstrip().split()]

if a==b==c:
    print(1)
elif a==b or b==c or a==c:
    print(2)
else:
    print(3)
x, y = map(int, input())

first_group = [1, 3, 5, 7, 8, 10, 12]
second_group = [4, 6, 9, 11]

if (x in first_group and y in first_group) or \
    (x in second_group and y in second_group) or \
    (x == 2 and y == 2):
    print('Yes')
else:
    print('No')


### FIXED CODE ###

x, y = map(int, input().split())

first_group = [1, 3, 5, 7, 8, 10, 12]
second_group = [4, 6, 9, 11]

if x == 2 or y == 2:
    print('No')
elif x in first_group and y in second_group:
    print('No')
elif x in second_group and y in first_group:
    print('No')
else:
    print('Yes')
text = "ACL"*int(K)
print(text)

### FIXED CODE ###

k = int(input())
text = "ACL" * k
print(text)
s=input()
print(s.strip(,))

### FIXED CODE ###

a,b,c=map(str,input().split(","))
print(a+" "+b+" "+c)
N = int(input().strip())

count = 0
while True:
    if (count + 1) ** 2 > N:
        print(coun ** 2t)
        break
    count += 1

### FIXED CODE ###

N = int(input().strip())
 
count = 0
while True:
    if (count + 1) ** 2 > N:
        print(count ** 2)
        break
    count += 1
N = int(input())
li = [input() for x in range(N)]
ans = 0
wli = list()
for k in li:
    wli.append(sorted(list(k))
for i in range(N):
    word = wli[i]
    for j in range(i+1, N):
        comp = wli[j]
        if word == comp:
            ans += 1
print(ans)            

### FIXED CODE ###

import collections
N = int(input())
li = [input() for x in range(N)]
ans = 0
di = dict()
for k in li:
    word = ''.join(sorted(list(k)))
    if word in di.keys():
        ans += di[word]
        di[word] += 1
    else:
        di[word] = 1
print(ans)