Harryxun/stf_run huggingface dataset:
n=int(input())
a=list(map(int, input().split()))
a.sort()
ans = 0
c= 0 #調べ始める位置する数
if a[0] != a[1]:
    c = 1
    ans = 1
else:
    c = a.count(a[0])

for i in range(c,n,1):
    for j in a[:i]:
        if a[i]%j == 0:
            break
    else:
        ans += 1
print(ans)


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
M = max(a)+1
t=[True]*M
a.sort()
s=set(a)
pre = 0
for i in a:
    if t[i] == 0:
        continue
    if pre == i:
        t[i] = False
    for j in range(2*i,M,i):
        t[j] = False
    pre = i
ans = 0
for k in a:
    if t[k] == True:
        ans += 1

print(ans)
n,a,b,c=map(int,input().split())
s=[]
for i in range(n):
    s.append(input())

ans=[]

flag=True

for i in range(n):
    if s[i]=='AB':
        if a==0 and b==0:
            flag=False
            break
        if a==1 and s[i+1]=='AC' or a==0:
            ans.append('A')
            a+=1
            b-=1
        else:
            ans.append('B')
            a-=1
            b+=1
    elif s[i]=='AC':
        if a==0 and c==0:
            flag=False
            break
        if a==1 and s[i+1]=='AB' or a==0:
            ans.append('A')
            a+=1
            c-=1
        else:
            ans.append('C')
            a-=1
            c+=1
    else:
        if c==0 and b==0:
            flag=False
            break
        if c==1 and s[i+1]=='AC' or c==0:
            ans.append('C')
            c+=1
            b-=1
        else:
            ans.append('B')
            c-=1
            b+=1
if flag:
    print("Yes")
    for i in ans:
        print(i)
else:
    print("No")

### FIXED CODE ###

n,a,b,c=map(int,input().split())
s=[]
for i in range(n):
    s.append(input())
s.append('EOF')

ans=[]
 
flag=True
 
for i in range(n):
    if s[i]=='AB':
        if a==0 and b==0:
            flag=False
            break
        if a==0 or (b!=0 and a==1 and s[i+1]=='AC'):
            ans.append('A')
            a+=1
            b-=1
        else:
            ans.append('B')
            a-=1
            b+=1
    elif s[i]=='AC':
        if a==0 and c==0:
            flag=False
            break
        if a==0 or (c!=0 and a==1 and s[i+1]=='AB'):
            ans.append('A')
            a+=1
            c-=1
        else:
            ans.append('C')
            a-=1
            c+=1
    else:
        if c==0 and b==0:
            flag=False
            break
        if c==0 or (b!=0 and c==1 and s[i+1]=='AC'):
            ans.append('C')
            c+=1
            b-=1
        else:
            ans.append('B')
            c-=1
            b+=1

if flag:
    print("Yes")
    for i in ans:
        print(i)
else:
    print("No")
S = input()

print("yes" if set(len(S))==len(S) else "no")


### FIXED CODE ###


S = input()

print("yes" if len(set(S))==len(S) else "no")
from https://github.com/kmyk/online-judge-tools

## Login
oj login URL

## DownLoad
oj dl URL

## test
oj test [-c COMMAND]
* Write the following in the first line of the python script
```python
#!/usr/bin/env python3
```


### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
''' 
------------------------
author : iiou16
------------------------
'''

def main():
    A = list(map(int, input().split()))

    if sum(A) > 21:
        print("bust")
    else:
        print("win")


if __name__ == '__main__':
    main()
N, H, W = map(int, input().split())

count=0

for i in range(N):
    A, B = map(int, input().split())
    if (A >= H)&(B >= W):
        count = count + 1

print(count)

### FIXED CODE ###

s = str(input())
count = 0
for i in s:
    if i == str(2):
        count = count + 1
print(count)
N, K = map(int, input().split())
P = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = -float('inf')
for s in range(N):
    ### Step1
    S = []  # 累積和S. ただし, 初項は0ではなく1回目の移動後の得点とする.
    # 1回目の移動
    i = P[s] - 1
    S.append(C[i])
    # 2回目以降の移動. スタート地点に戻ってくるまで繰り返し.
    while i != s:
        i = P[i] - 1
        S.append(S[-1] + C[i])

    ### Step2: KとSの長に応じて場合分けして, 得点の最大値を求める.
    # 1周未満しか移動できない場合:
    if K <= len(S):
        score = max(S[:K])
    # 1周以上回ることができるが, ループを1周したときに得点が減る場合:
    elif S[-1] <= 0:
        score = max(S)
    # 1週以上回ることができ, かつループを1週するごとに得点が増える場合:
    else:
        # ループを (K // len(S) - 1)回 廻る場合:
        score1 = S[-1] * (K // len(S) - 1)
        score1 += max(S)
        # ループを (K // len(S))回 廻る場合:
        score2 = S[-1] * (K // len(S))
        r = K % len(S)
        if r != 0:
            score2 += max(0, max(S[:r]))
        # score1 と score2 の大きい方がこの場合の得点の最大値
        score = max(score1, score2)

    ans = max(ans, score)

print(ans)

### FIXED CODE ###

X, K, D = map(int,input().split())
res = 0
X = abs(X)
if X >= K * D:
    res = X - K * D
else:
    i = X // D
    j = K - i
    if j % 2 == 0:
        res = X - D * i
    else:
        res = X - D * (i + 1)
print(abs(res))
S = input()
A = 0
for s in S
	if s == "-":
		A--
	if s == "+":
		A++
print(A);

### FIXED CODE ###

S = input()
A = 0
for s in S:
	if s == "-":
		A -= 1
	if s == "+":
		A += 1
print(A);
N, K = map(int, input().split())
A = N % K
if A == 0:
    print(0)
else:
    else(1)

### FIXED CODE ###

N, K = map(int, input().split())
A = N % K
if A == 0:
    print(0)
else:
    print(1)
A=variable
B=variable_2
A=1
B=1
while A and B <= 9;
	print(A*B)
	A=A+1
	B=B+1

### FIXED CODE ###

entrada = input().split();
numeros =[int(entrada[0]),int(entrada[1])] 
if(numeros[0]>=1 and numeros[0]<=9 and numeros[1]>=1 and numeros[1]<=9):
	print(numeros[0]*numeros[1])
else:
	print(-1)
import sys
a, b, c = map(int, raw_input().split())
if a<b<c:
	print "Yes"
else:
	print "No"

### FIXED CODE ###

a, b, c = map(int, raw_input().split())
if a<b<c:
	print "Yes"
else:
	print "No"
n, m, k = map(int, input().split())
a_ = list(map(int, input().split()))
b_ = list(map(int, input().split()))

a = [0]
for i in range(n):
    a.append(a[i]+a_[i])

b = [0]
for i in range(m):
    b.append(b[i]+b_[i])

for i in range(n):
    j = m
    if a[i] > k:
        break
    while 1:
        if b[j] < k - a[i]:
            break
        j -= 1

print(i+j)
        


### FIXED CODE ###

n, m, k = map(int, input().split())
a_ = list(map(int, input().split()))
b_ = list(map(int, input().split()))

a = [0]
for i in range(n):
    a.append(a[i]+a_[i])

b = [0]
for i in range(m):
    b.append(b[i]+b_[i])

j = m
ans = 0
for i in range(n+1):
    if a[i] > k:
        break
    while 1:#b[j] > k - a[i]:
        if b[j] <= k - a[i]:
            break
        j -= 1
    ans = max(ans, i + j)

print(ans)
import math
N=map(int,input().split())
a=N/2
print(math.ceil(a))


### FIXED CODE ###

import math
N=int(input())
a=N/2
print(math.ceil(a))
import math
a, b = list(map(int, input().split()))
x = a * 100 + b

flag = False
for i in range(1,int(math.sqrt(x))+1):
    if i ** 2 == x:
        flag =True
        break:

print("Yes" if flag else "No")

### FIXED CODE ###

import math
a, b = input().split()
x = int(a) * 10 ** len(b) + int(b)

flag = False
for i in range(1,int(math.sqrt(x))+1):
    if i ** 2 == x:
        flag =True
        break

print("Yes" if flag else "No")
#!/usr/bin/env python3
import sys


def solve(N: int, Y: int):
    for i in range(2000+1):
        for j in range((2000+1)-i):
            k = Y-10000*i-5000*j
            if(k//1000 == N-i-j):
                print(i,j,k)
                sys.exit()

    prnt(-1,-1,-1)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(N, Y)

if __name__ == '__main__':
    main()


### FIXED CODE ###

## ABC 085C
## C - Otoshidama

import sys
n, y = (int(_) for _ in input().split())

for i in range(0,n+1):
    for j in range(0,n+1-i):
        if(10000*i+5000*j+1000*(n-i-j) == y):
            print(i,j,n-i-j)
            sys.exit()
                    
print('-1 -1 -1')
=input()
ans=0
for i in range(3):
    if int(n[i]) == 7:
        ans=1
print("YES" if ans == 1 else "NO")

### FIXED CODE ###

n=input()
ans=0
for i in range(3):
    if int(n[i]) == 7:
        ans=1
print("Yes" if ans == 1 else "No")
N=input()
for i in range(N):
  A[i]=list(map(int,input().split()))

count=0
  
for i=0 in range(N):
  if A[i]%2==0:
    if A[i]%3==0 or A[i]%5==0:
      print('APPROVED')
      count=1
      break
  elif:
    continue
    
if count=0:
  print('DENIED')

### FIXED CODE ###

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

lst=0
  
for i in range(N):
  if A[i]%2==0:
    if A[i]%3!=0 and A[i]%5!=0:
      lst+=1
      break

    
if lst==1:
  print('DENIED')
else:
  print('APPROVED')
N, X = map(int, input().split())

def Burger(L, burger):
    if L == 0:
        return burger
    else:
        burger = "B" + burger + "P" + burger + "B"
        L -= 1
        return Burger(L, burger)

burger_lvX = str(Burger(N, "P"))

print(burger_lvX[:X].count("P"))

### FIXED CODE ###

N, X = map(int, input().split())
a, p = [1], [1]

for i in range(50):
    a.append(a[i]*2+3)
    p.append(p[i]*2+1)

def Burger(N, X):
    if N == 0:
        return 1
    if X == 1:
        return 0
    elif 1 < X <= a[N-1]+1:
        return Burger(N-1, X-1)
    elif X == a[N-1]+2:
        return p[N-1]+1
    else:
        return p[N-1]+1+Burger(N-1, X-2-a[N-1])

print(Burger(N, X))
a=int(input())
b=list(map(int, input().split()))
c=1
if 0 in b:
    d=1
for i in range(a):
    c*=b[i]
    if d!=1 and c>10**18:
        print(-1)
        exit()


print(c)


### FIXED CODE ###


a=int(input())
b=list(map(int, input().split()))
c=1
d=0
if 0 in b:
    print(0)
    exit()
for i in range(a):
    c*=b[i]
    if c>10**18:
        print(-1)
        exit()


print(c)
# -*- coding: utf-8 -*-

N, M = map(int,input().split())

street = []

for i in range(0,M):
    street.append(0)

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

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


### FIXED CODE ###

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

N, M = map(int,input().split())

street = [0 for i in range(N)]

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

for s in street:
    print(s)
li = list(map(int,input().split()))
a = 0
b = 0
out = 0
isA = True
for i in range(li[0]):
    if(isA):
        a += 1
        out += 1
        if(a >= li[1]):
            isA = False
            a = 0
    else:
        b += 1
        if(b >= li[2]):
            isA = True
            b = 0
print(out)

### FIXED CODE ###

A = False
B = False
s=input()
for char in s:
    if char == "A":
        A = True
    if char == "B":
        B = True
if(A and B):
    print("Yes")
else:
    print("No")
mx = max(mx, min(i, len(l)-x))

### FIXED CODE ###

import sys
l = list(raw_input())
if (not "0" in l) or (not "1" in l):
    print len(l)
    sys.exit()

s = l[0]
f = False
mx = 0
x = 0
for i, n in enumerate(l):
    if not n == s:
        mx = max(mx, min(i, len(l)-x))
        x = i
        s = n
mx = max(mx, min(i, len(l)-x))
print mx
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors[1:] + upper_divisors[::-1]

# print('input >>')
N = int(input())
As = list(map(int,(input().split())))

As.sort()
print(As)

warusu = set()
ans = 0

# for x in range(len(As)):
    # print(As)

for A1 in As:
    for A2 in sorted(As, reverse=True):
        if A2 % A1 == 0:
            As.remove(A1)

# print('-----output-----')
print(len(As))

### FIXED CODE ###

# print('input >>')
N = int(input())
As = list(map(int,(input().split())))

As.sort()
# print(As)

all_nums = [0] * (As[-1] + 1)

for A in As:
    all_nums[A] += 1

dup = 0

for i, num in enumerate(all_nums):
    if num == 0:
        continue
    if num > 1:
        dup += num
    j = 2
    while i * j <= As[-1]:
        all_nums[i*j] = 0
        j += 1
    # print(all_nums)

print(sum(all_nums)-dup)
H, W = map(int, input().split())
N = int(input())
A = list(map(int, input().split()))
D = {}
for i in range(N):
    D[i + 1] = A[i]
C = ''
for k, v in D.items():
    C += v * str(k)
while True:
    c = C[:W]
    for i in range(W):
        print(c[i], end=' ')
    print('')
    if len(C) == W:
        break
    C = C[W:]
    c = C[:W]
    for i in range(W - 1, -1, -1):
        print(c[i], end=' ')
    print('')
    if len(C) == W:
        break
    C = C[W:]


### FIXED CODE ###

H, W = map(int, input().split())
N = int(input())
A = list(map(int, input().split()))
D = {}
for i in range(N):
    D[i + 1] = A[i]
C = []
for k, v in D.items():
    [C.append(k) for _ in range(v)]
h = 0
while True:
    h += 1
    for i in range(W):
        print(C[i], end=' ')
    print('')
    [C.pop(0) for _ in range(W)]
    if h == H:
        break
    h += 1
    for i in reversed(range(W)):
        print(C[i], end=' ')
    print('')
    [C.pop(0) for _ in range(W)]
    if h == H:
        break
from collections import deque
import sys
sys.setrecursionlimit(20000000)
N, M = map(int, input().split())
graph = [[] for j in range(M)]
q = deque([])
depth_array = [-1 for i in range(N)]

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

def bfs(graph, q, depth_array):
    # 終了条件
    if len(q) == 0:
        return depth_array

    cur_room = q.popleft()

    # キューに追加
    for r in graph[cur_room]:
        if depth_array[r] == -1: #未訪問なら
            q.append(r)
            depth_array[r] = depth_array[cur_room] + 1

    return bfs(graph, q, depth_array)
    
# init
q.append(0)
depth_array[0] = 0
depth_array = bfs(graph, q, depth_array)

mark_array = [-1 for i in range(N)]
#print(depth_array)

for room, depth in enumerate(depth_array):
    for node in graph[room]:
        if depth_array[node] + 1 == depth_array[room]:
            mark_array[room] = node
if -1 in mark_array[1:]:
    print("No")
else:
    print("Yes")
    for m in mark_array[1:]:
        print(m+1)


### FIXED CODE ###

from collections import deque
import sys
sys.setrecursionlimit(200000)
N, M = map(int, input().split())
graph = [[] for j in range(N)]
q = deque([])
depth_array = [-1 for i in range(N)]

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

def bfs(graph, q, depth_array):
    # 終了条件
    if len(q) == 0:
        return depth_array

    cur_room = q.popleft()

    # キューに追加
    for r in graph[cur_room]:
        if depth_array[r] == -1: #未訪問なら
            q.append(r)
            depth_array[r] = depth_array[cur_room] + 1

    return bfs(graph, q, depth_array)
    
# init
q.append(0)
depth_array[0] = 0
depth_array = bfs(graph, q, depth_array)

mark_array = [-1 for i in range(N)]
#print(depth_array)

for room, depth in enumerate(depth_array):
    for node in graph[room]:
        if depth_array[node] + 1 == depth_array[room]:
            mark_array[room] = node

if -1 in mark_array[1:]:
    print("No")
else:
    print("Yes")
    for m in mark_array[1:]:
        print(m+1)
n=int(input())

a=list(input.split())

if 'Y' in a:
    print('Four')

else:
    print('Three')

### FIXED CODE ###

n=int(input())

a=input().split()

if 'Y' in a:
    print('Four')

else:
    print('Three')
s=input()
k=int(input())
ans=[]
for i in range(len(s)):
    for j in range(i+1,len(s)+1):
        ans.append(s[i:j])
ans.sort()
a=[ans[0]]
for i in range(1,len(ans)):
    if ans[i-1]!=ans[i]:
        a.append(ans[i])
print(a[k-1])

### FIXED CODE ###

a,b,c,d=map(int,input().split())
print("Yes" if (abs(b-a)<=d and abs(c-b)<=d) or abs(c-a)<=d else "No" )
a, b = [int(i) for i in input().split("")]
if (a*b)%2 == 1:
    print("Odd")
else:
    print("Even")

### FIXED CODE ###

S = input().split(" ")
a, b = [int(i) for i in S]
if (a*b)%2 == 1:
    print("Odd")
else:
    print("Even")
a = int(input())
 sum = int(a + a * a + a * a * a)
 print(sum)

### FIXED CODE ###

a = int(input())
sum = int(a + a * a + a * a * a)
print(sum)
a,b,c=map(int,input().split())
for i in range(B):
  if (i*a)%b==c:
    print('YES')
    break
print('NO')

### FIXED CODE ###

a,b,c=map(int,input().split())
ans='NO'
for i in range(1,b+1):
  if (i*a)%b==c:
    ans='YES'
    break
print(ans)
def prime_eratosthenes(n):
    prime_list = []
    num_list=[]
    for i in range(2, n+1):
        if i not in num_list:
            prime_list.append(i)
            for j in range(i*i, n+1, i):
                num_list.append(j)
    return prime_list

ls = prime_eratosthenes(10000)
ls2 = [i+1 for i in range(10000)]
Q = int(input())
for i in range(Q):
    l, r = map(int, input().split())
    ans = 0
    for j in range(l-1, r):
        if (ls2[j] in ls) and (ls2[j+1]//2 in ls):
            ans += 1
    print(ans)

### FIXED CODE ###

q = int(input())
    
def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True

ls = [0]

for i in range(1,100000):
    if is_prime(i) and is_prime((i+1)//2):
        ls.append(ls[i-1]+1)
    else:
        ls.append(ls[i-1])
        
for i in range(q):
    l,r = map(int,input().split())
    if l == r:
        if is_prime(l) and is_prime((l+1)//2):
            print(1)
        else:
          print(ls[r]-ls[l-1])  
    else:
        print(ls[r]-ls[l-1])
xyz=input().split()
a=int(xyz[0])
b=int(xyz[1])
c=int(xyz[2])
s=[]
d=[]

for i in range(1,max(a,b)):
  if a%i==0 and b%i==0:
    s.append(i)
s.sort()
print(s[-c])

### FIXED CODE ###

li=[int(i) for i in input().split()]
a=li[0]
b=li[1]
k=li[2]
c=[]
for i in range(1,min(a,b)+1):
    if(a%i==0 and b%i==0):
        c+=[i]

print(c[-k])
s = input()
t = input()
dp = [[0 for _ in range(len(t)+1)] for _ in range(len(s)+1)]
for i in range(len(s)):
	for j in range(len(t)):
		if s[i] == t[j]:
			dp[i+1][j+1] = dp[i][j] + 1
		elif dp[i+1][j] >= dp[i][j+1]:
			dp[i+1][j+1] = dp[i+1][j]
		else:
			dp[i+1][j+1] = dp[i][j+1]

ans = ""

i, j = len(s), len(t)

while i > 0 or j > 0:
	#if dp[i][j] == dp[i-1][j-1] + 1:
	if s[i-1] == t[j-1]:
		ans += s[i-1]
		i, j = i-1, j-1
	elif dp[i][j-1] >= dp[i-1][j]:
		j -= 1
	else:
		i -= 1

print(ans[::-1])

### FIXED CODE ###

s = input()
t = input()
dp = [[0 for _ in range(len(t)+1)] for _ in range(len(s)+1)]
for i in range(len(s)):
	for j in range(len(t)):
		if s[i] == t[j]:
			dp[i+1][j+1] = dp[i][j] + 1
		elif dp[i+1][j] >= dp[i][j+1]:
			dp[i+1][j+1] = dp[i+1][j]
		else:
			dp[i+1][j+1] = dp[i][j+1]

ans = ""

i, j = len(s), len(t)

while i > 0 and j > 0:
	#if dp[i][j] == dp[i-1][j-1] + 1:
	if s[i-1] == t[j-1]:
		ans += s[i-1]
		i, j = i-1, j-1
	elif dp[i][j-1] >= dp[i-1][j]:
		j -= 1
	else:
		i -= 1

print(ans[::-1])
s,t=int(input().split())
print(t+s)

### FIXED CODE ###

s,t=input().split()
print(t+s)
#! /bin/python
# coding:utf-8

N = input()
A = map(int, raw_input().split())
s = set()
dep = []

for i in A:
	if i in s:
		dep.append(i)
	s.add(i)

dep.sort()
dep.reverse()

if (len(dep) < 2):
	print 0
else:
	print dep[0] * dep[1]

### FIXED CODE ###

#! /bin/python
# coding:utf-8

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

if (abs(x - a) < abs(x - b)):
	print "A"
else:
	print "B"
NK = list(map(int, input().split(' ')))
N = NK[0]
K = NK[1]
A = list(map(int, input().split(' ')))

for i in range(K, N):
    if (A[i-k] < A[i]):
        print('Yes')
    else:
        print('No')


### FIXED CODE ###

NK = list(map(int, input().split(' ')))
N = NK[0]
K = NK[1]
A = list(map(int, input().split(' ')))

for i in range(K, N):
    if (A[i-K] < A[i]):
        print('Yes')
    else:
        print('No')
#coding: utf-8

a = input()

print(24 - a + 24)

### FIXED CODE ###

#coding: utf-8

a = int(input())

print(24 - a + 24)
r=input()
print(r^2)

### FIXED CODE ###

r=int(input())
print(r**2)
a,b=int(input().split())
print((b+1)//a)

### FIXED CODE ###

a,b = list(map(int, input().split()))
i=0
while b>(a-1)*i+1:
	i+=1
print(i)
class edge():
    def __init__(self,_to,_cost):
        self.to = _to;
        self.cost = _cost;

N = int(input())
tree = {i:[] for i in range(N+1)}

for i in range(N-1):
    a,b,c = list(map(int,input().split()))
    a = a - 1
    b = b - 1
    tree[a].append(edge(b,c))
    tree[b].append(edge(a,c))
Q,K = list(map(int,input().split()))
K = K - 1
depth = [None]*N

def DFS(v,p,d):
    depth[v] = d
    for e in tree[v]:
        if e.to == p:
            continue
        DFS(e.to, v, d + e.cost)
DFS(K,-1,0)

for _ in range(Q):
    x,y = list(map(int, input().split()))
    x = x - 1
    y = y - 1
    print(depth[x] + depth[y])

### FIXED CODE ###

import sys;sys.setrecursionlimit(int(1e7))

class edge():
    def __init__(self,_to,_cost):
        self.to = _to;
        self.cost = _cost;

N = int(input())
tree = [[] for i in range(N+1)]

for i in range(N-1):
    a,b,c = map(int,input().split())
    a = a - 1
    b = b - 1
    tree[a].append(edge(b,c))
    tree[b].append(edge(a,c))
Q,K = map(int,input().split())
K = K - 1
depth = [None]*N

def DFS(v,p,d):
    depth[v] = d
    for e in tree[v]:
        if e.to == p:
            continue
        DFS(e.to, v, d + e.cost)
DFS(K,-1,0)

for _ in range(Q):
    x,y = map(int, input().split())
    x = x - 1
    y = y - 1
    print(depth[x] + depth[y])
L=int(input())
print(f"{(L/3)**3:.6f}")

### FIXED CODE ###

L=float(input())
print((L/3)**3)
n = int(input())
xyh = [list(map(int, input().split())) for _ in range(n)]

xyh.sort(key=lambda x:x[2], reverse=True)


for cx in range(101):
    for cy in range(101):
        x, y, h = xyh[0]
        H = abs(x - cx) + abs(y - cy) + h
        f = True

        for i in range(1, n):
            x, y, h = xyh[i]
            HH = abs(x - cx) + abs(y - cy) + h
            if HH != H:
                f = False
                break

        if f:
            ans = (cx, cy, H)

print(ans[0], ans[1], ans[2])


### FIXED CODE ###

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

xyh.sort(key=lambda x:x[2], reverse=True)
for cx in range(101):
    for cy in range(101):
        x, y, h = xyh[0]
        H = abs(x - cx) + abs(y - cy) + h
        f = True

        for i in range(1, n):
            x, y, h = xyh[i]
            h2 = max(0, H - abs(x - cx) - abs(y - cy))
            if h != h2:
                f = False
                break

        if f:
            ans = (cx, cy, H)

print(ans[0], ans[1], ans[2])
N=int(input())
A=list(map(int,input().split()))
A.sort()
B=[]
B.append(A[0])
for i in range(N-1):
    B.append(A[i+1]-A[i])

B.sort()
B[1]+=B[0]
B[0]=B[1]
Ans=B[0]

for i in range(N):
    a=max(Ans,B[i])
    b=min(Ans,B[i])
    r=a%b
    while r>0:
        a=b
        b=r
        r=a%b
    Ans=b
print(Ans)

### FIXED CODE ###

def gcd(a , b):
    r = a%b
    while r:
        a=b
        b=r
        r=a%b
    return b

N=int(input())
A=list(map(int,input().split()))
L=[0]*100000
R=[0]*100000
L[0]=A[0]
for i in range(N-1):
    L[i+1]=gcd(L[i],A[i+1])
R[N-1]=A[N-1]
for i in reversed(range(N-1)):
    R[i]=gcd(R[i+1],A[i])
Ans=max(L[N-2],R[1])
for i in range(1,N-1):
    Ans=max(Ans,gcd(L[i-1],R[i+1]))
print(Ans)
import bisect
import sys
N, M = map(int, input().split())
ls = []
for i in range(1, int(M**(1/2))+1):
    if M%i == 0:
        ls.append(i)
ans = []
for x in ls:
    ans.append(x)
    ans.append(M//x)
print(ans[bisect.bisect_left(ans, N)])

### FIXED CODE ###

import sys
N, M = map(int, input().split())
ls = []
for i in range(2, int(M**(1/2))+1):
    if M%i == 0:
        ls.append(i)
if N == 1:
    print(M)
    sys.exit()
ans = 1
for x in ls:
    if x >= N:
        ans = max(ans, M//x)
        continue
    if M//x >= N:
        ans = max(ans, x)
print(ans)
N=int(input())
s=input()
S=list(s)
#print(S[0])
flg=0
for i in range(N-1):
    if S[i] == 'A':
        if S[i+1] =='B':
            if S[i+2] =='C':
                flg+=1
print(flg)

### FIXED CODE ###

N=int(input())
s=input()
S=list(s)
#print(S[0])
flg=0
for i in range(N-2):
    if S[i] == 'A':
        if S[i+1] =='B':
            if S[i+2] =='C':
                flg+=1
print(flg)