Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
import itertools
import sys
import math
from functools import lru_cache

# 1整数
n = int(input())

divide = 1000000007

agct = ['A', 'G', 'C', 'T']

out = set()
for c in agct:
    out.add('AGC' + c)
    out.add(c+'AGC')
    out.add( 'A' + c + 'GC')
    out.add('AG' + c + 'C')
    out.add('GAC' + c)
    out.add(c+'GAC')
    out.add('ACG' + c)
    out.add(c+'ACG')

##後ろ4文字を与えて，それがokかどうか
def isok(str):
    if str[-4:] in out:
        return False
    return True


#N文字で最後の4文字がstrの時の種類数
@lru_cache(maxsize=1000000)
def saiki(n,str):
    if n == 4:
        if isok(str):
            return 1
        return 0
    ret = 0
    if isok(str)==False:
        return 0
    for c in agct:
        next = c+str
        next = next[0:4]
        ret += saiki(n-1,next)
    return ret%divide

strlist = list(itertools.product(agct, repeat=4))
#print('len is ',len(strlist))
rr = 0
for strs in strlist:
    rr += saiki(n,''.join(strs))
print(rr%divide)




### FIXED CODE ###

# -*- coding: utf-8 -*-
import itertools
import sys
import math
from functools import lru_cache

# 1整数
n = int(input())
if n == 3:
    print('61')
    quit()

divide = 1000000007

agct = ['A', 'G', 'C', 'T']

out = set()
for c in agct:
    out.add('AGC' + c)
    out.add(c+'AGC')
    out.add( 'A' + c + 'GC')
    out.add('AG' + c + 'C')
    out.add('GAC' + c)
    out.add(c+'GAC')
    out.add('ACG' + c)
    out.add(c+'ACG')

##後ろ4文字を与えて，それがokかどうか
def isok(str):
    if str[-4:] in out:
        return False
    return True


#N文字で最後の4文字がstrの時の種類数
@lru_cache(maxsize=1000000)
def saiki(n,str):
    if n == 4:
        if isok(str):
            return 1
        return 0
    ret = 0
    if isok(str)==False:
        return 0
    for c in agct:
        next = c+str
        next = next[0:4]
        ret += saiki(n-1,next)
    return ret%divide

strlist = list(itertools.product(agct, repeat=4))
#print('len is ',len(strlist))
rr = 0
for strs in strlist:
    rr += saiki(n,''.join(strs))
print(rr%divide)
a, b = map(int, input().split())
if a*b%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")
a = int(input())
b = int(input())

print("%d %d", % a*b, 2*a + 2*b)



### FIXED CODE ###

a, b = map(int,input().split())
print("%d %d" %(a*b, 2*(a+b) ) )
def main():
    n, m, k = map(int, input().split())
    aa = list(map(int, input().split()))
    bb = list(map(int, input().split()))
    ans = []
    time_sum = 0
    for i in range(n):
        for j in range(1, m):
            time_sum = sum(aa[:i]) + sum(bb[:j])
            if time_sum <= k:
                ans.append(i+j)

    if(len(ans) == 1):
        return ans[0]
    else:
        return max(ans)


if __name__ == '__main__':
    ans = main()
    print(ans)


### FIXED CODE ###

n, m, k = map(int, input().split())
aa = list(map(int, input().split()))
bb = list(map(int, input().split()))
asum = [0]
bsum = [0]

for i in range(len(aa)):
    asum.append(asum[i]+aa[i])
for i in range(len(bb)):
    bsum.append(bsum[i]+bb[i])

j = len(bsum)-1
ans = 0
for i in range(len(asum)):
    while j >= 0:
        if k >= asum[i] + bsum[j]:
            ans = max(ans, i+j)
            break
        else:
            j -= 1


print(ans)
import input
input = sys.stdin.readline

N,K = map(int,input().split())
H = [int(x) for x in input().split()]
 
def main(N,K,H):
    dp = [0]*N
    for i in range(1,N):
        L = [dp[j]+abs(H[i]-H[j]) for j in range(max(0,i-K),i)]
        dp[i] = min(L)
    print(dp[-1])
main(N,K,H)

### FIXED CODE ###

# -*- coding: utf-8 -*- 
def cost(h,N,K):
    dp=[0]*N
    dp[1]=abs(h[0]-h[1])
    for i in range(2,N):
        tmp=[abs(h[i]-h[j])+dp[j] for j in range(max(0,i-K),i)]
        dp[i]=min(tmp)
    return dp[-1]

N,K=map(int,input().split())
h=[int(num) for num in input().split()]

print(cost(h,N,K))
def main():
    N = int(input())
    i = 0
    while N >0:
        n = int(str(N)[-1])
        if n % 2 != 0:
            i+=1
        N -= 1
    print(i)
main()

### FIXED CODE ###

def main():
    A, B, C = map(int, input().split())
    output = C - A + B
    if output < 0:
        print(0)
    else:
        print(output)
main()
from collections import Counter


def solve(V):
    n = len(V)
    odd = Counter()
    even = Counter()
    total = Counter()
    for i, c in enumerate(V):
        total.update([c])
        if i % 2 == 0:
            even.update([c])
        else:
            odd.update([c])

    total_max = total.most_common()[0]
    if total_max[1] == len(V):
        return len(V) / 2

    even_maxs = even.most_common(2)
    odd_maxs = odd.most_common(2)
    if len(odd_maxs) > 1:
        odd_max, odd_2nd_max = odd_maxs[0], odd_maxs[1]
    else:
        odd_max, odd_2nd_max = odd_maxs[0], None

    if len(even_maxs) > 1:
        even_max, even_2nd_max = even_maxs[0], even_maxs[1]
    else:
        even_max, even_2nd_max = even_maxs[0], None

    ans = 0
    if odd_max[0] != even_max[0]:
        return n - odd_maxs[0][0] - even_maxs[0][0]
    elif odd_2nd_max != None and even_2nd_max == None:
        return n - odd_maxs[1][0] - even_maxs[0][1]
    elif odd_2nd_max == None and even_2nd_max != None:
        return n - odd_maxs[0][1] - even_maxs[1][1]
    else:  # odd_2nd_max != None and even_2nd_max != None:
        return n - max(even_maxs[0][1] + odd_maxs[1][1], 
                       even_maxs[1][1] + odd_maxs[0][1])

    for key, count in even.items():
        if key != even_max:
            ans += count
    for key, count in odd.items():
        if key != odd_max:
            ans += count
    return ans


if __name__ == "__main__":
    n = int(input())
    l = input()
    print(solve(l.split(" ")))


### FIXED CODE ###

import collections
 
n = int(input())
v = list(map(int, input().split()))
a = v[::2]
b = v[1::2]
ac = collections.Counter(a).most_common(2)
bc = collections.Counter(b).most_common(2)
if ac[0][0] != bc[0][0]:
    print(n - ac[0][1] - bc[0][1])
else:
    if len(ac) == 1:
        print(n // 2)
    else:
        print(n - max(ac[0][1] + bc[1][1], ac[1][1] + bc[0][1]))
N = int(input())

x = [0] * N
u = [0] * N

for i in range(N):
    x[i], u[i]  = map(int, input().split())


ans = []

btc_1 = 380000.0

for i  in range(N):
    if u[i] == "JPY":
        ans.append(x[i])
    else:
        yen = ((x[i])*(btc_1)
        ans.append(yen)

print(sum(ans))

### FIXED CODE ###

N=int(input())
ans=0
for i in range(N):
    x,u=map(str,input().split())
    x=float(x)
    if u=="JPY":
        ans+=x
    else:
        ans+=380000.0*x
print(ans)
(n, m) = list(map(int, input().split()))
a = list(map(int, input().split()))
unique_a = {a[0] % m: 1}
for i in range(1, n):
    a[i] += a[i - 1]
    a[i] %= m
    if a[i] in unique_a:
        unique_a[a[i]] += 1
    else:
        unique_a[a[i]] = 1
count = unique_a[0]
for k in unique_a:
    count += unique_a[k] * (unique_a[k] - 1) // 2
print(count)

### FIXED CODE ###

import numpy as np
(n, m) = list(map(int, input().split()))
a = np.array(list(map(int, input().split()))).astype("int64") 
a = np.cumsum(a)
a %= m
count = np.sum(a == 0)
a.sort()
tc = 1
for i in range(1, n):
    if a[i - 1] == a[i]:
        tc += 1
    else:
        count += tc * (tc - 1) // 2
        tc = 1
else:
    count += tc * (tc - 1) // 2
print(count)
print(hoge)

### FIXED CODE ###

A,B,N = map(int, input().split())
print(A*min(N,B-1)//B)
N = int(input())

l = []
for i in range(1, 10):
    for j in range(1, 10):
        l.append(i * j)

if N in l:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

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

if A >= 10 or B >= 10:
    print(-1)
else:
    print(A*B)
a=input()
if a[0]=a[1] and a[2]=a[3]:
  print('Yes')
elif a[0]=a[2] and a[1]=a[3]:
  print('Yes')
elif a[0]=a[3] and a[1]=a[2]:
  print('Yes')  
else:
  print('No')

### FIXED CODE ###

a=input()
if a[0]==a[1] and a[2]==a[3] and a[0]!=a[2]:
  print('Yes')
elif a[0]==a[2] and a[1]==a[3] and a[0]!=a[1]:
  print('Yes')
elif a[0]==a[3] and a[1]==a[2] and a[0]!=a[1]:
  print('Yes')  
else:
  print('No')
from collections import deque

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

b = deque([])

for i,ai in enumerate(a):
  if i%2 == 0:
    b.append(ai)
    
  else:
    b.appendleft(ai)
    
if n%2 == 1:
  print(*b[::-1])
else:
  print(*b)



### FIXED CODE ###

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

if N%2 == 0:
    b = A[N-1::-2] + A[0::2]
else:
    b = A[N-1::-2] + A[1::2]
    
print(*b)
N, M = map(int,input().split())
 A = list(map(int,input().split()))
 S = sum(A)
 cnt = 0
 for a in A:
    if a >= S / (4*M):
      cnt += 1
 if cnt >= M:
  print("Yes")
 else:
  print("No")

### FIXED CODE ###

N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse=True)
S = sum(A)
if A[M-1] >= S / (4*M):
  print("Yes")
else:
  print("No")
import sys

args = sys.argv

val = [int(args[1]),int(args[2]),int(args[3])]

for i in val:
    if 1 >= i and i <= 100:
        print('No')
        sys.exit()

if val[0] == val[1] and val[1] == val[2]:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

import sys

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

val = [a,b,c]

for i in val:
    if 1 >= i and i <= 100:
        print('No')
        sys.exit()

if val[0] == val[1] and val[1] == val[2]:
    print('Yes')
else:
    print('No')
from sys import stdin
import sys
import math
from functools import reduce
import itertools

n = int(stdin.readline().rstrip())

d = {}

for i in range(n):
    s = stdin.readline().rstrip()

    if s in d:
        d[s] += 1
    else:
        d[s] = 1

d = sorted(d.items(), key=lambda x:x[1], reverse=True)

m = d[0][1]
a = []
for i in range(n):
    if d[i][1] == m:
        a.append(d[i][0])
    else:
        break

a.sort()

for aa in a:
    print(aa)

### FIXED CODE ###

from sys import stdin
import sys
import math
from functools import reduce
import itertools

n = int(stdin.readline().rstrip())

d = {}
for i in range(n):
    s = stdin.readline().rstrip()

    if s in d:
        d[s] += 1
    else:
        d[s] = 1

d = sorted(d.items(), key=lambda x:x[1], reverse=True)

m = d[0][1]
a = []
i = 0
for i in range(len(d)):
    if d[i][1] == m:
        a.append(d[i][0])
    else:
        break

a.sort()

for aa in a:
    print(aa)
N,K=map(int, input().split())
AA=list(map(int, input().split()))
A=sorted(AA)
B=sorted(AA)[::-1]
mod=10**9+7

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod
mod = 10**9+7 #出力の制限
n = 5*(10**4)+2
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, n+1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

ans=0
for i in range(N-K+1):
  d=(A[K-1+i]%mod)*cmb(K-1+i,K-1,mod)
  e=(B[K-1+i]%mod)*cmb(K-1+i,K-1,mod)
  ans+=d%mod-e%mod
  ans%=mod
print(ans)


### FIXED CODE ###

N,K=map(int, input().split())
AA=list(map(int, input().split()))
A=sorted(AA)
B=sorted(AA)[::-1]
mod=10**9+7

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod
mod = 10**9+7 #出力の制限
n = 10**6+1
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, n+1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

ans=0
for i in range(N-K+1):
  d=(A[K-1+i]%mod)*cmb(K-1+i,K-1,mod)
  e=(B[K-1+i]%mod)*cmb(K-1+i,K-1,mod)
  ans+=d%mod-e%mod
  ans%=mod
print(ans)
#!/usr/bin/env python3
#ABC66 D

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

def comb(n,r):
    if n - r < 0:
        return 0
    return fact[n]*pow(fact[r],mod-2,mod)*pow(fact[n-r],mod-2,mod) % mod
n = I()
a = LI()
f = defaultdict(lambda : 0)
for i in range(n):
    if f[a[i]] == 0:
        f[a[i]] += 1
    else:
        x = a[i]
        break
fact = [0]*(n+2)
fact[0] = 1
for i in range(1,n+2):
    fact[i] = i*fact[i-1]

lst = []
for i in range(n+1):
    if a[i] == x:
        lst.append(i+1)
a,b = lst[0],lst[1]
for i in range(n+1):
    res = 0
    res = (res + comb(n+1,i+1)) % mod
    res = (res - comb((a-1)+(n+1-b),i)) % mod
    print(res)
    

### FIXED CODE ###

#!/usr/bin/env python3
#ABC66 D

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def f(a, b):
    if b == 0: 
        return 1
    if b % 2 == 0:
        d = f(a, b // 2)
        return d * d % mod
    if b % 2 == 1:
        return (a * f(a, b - 1)) % mod


def comb(n,r):
    if n - r < 0:
        return 0
    return fact[n] * invfact[r] * invfact[n-r] % mod

n = I()
a = LI()
cnt = [0]*(n+1)
for i in range(n+1):
    if cnt[a[i]]:
        a = cnt[a[i]]
        b = i+1
        break
    else:
        cnt[a[i]] = i+1

fact = [1]*(n+2)
invfact = [1]*(n+2)
for i in range(1,n+2):
    fact[i] = i*fact[i-1] % mod
    invfact[i] = invfact[i-1] * f(i,mod-2) % mod

for i in range(n+1):
    res = 0
    res = (res + comb(n+1,i+1)) % mod
    res = (res - comb((a-1)+(n+1-b),i)) % mod
    print(res)
import itertools
import operator

N, K = map(int, input().split())
sushi = [(i, *[int(x) for x in input().split()]) for i in range(N)]
sushi.sort(key=operator.itemgetter(2), reverse=True)

from collections import OrderedDict, deque, Counter
left = OrderedDict((x[0], x) for x in sushi)

base = 0
choosen = []
choosen_kind = set()
for x in sushi:
    i, t, _ = x
    if t not in choosen_kind:
        choosen.append(x)
        choosen_kind.add(t)
        del left[i]

choosen.sort(key=operator.itemgetter(2), reverse=True)
choosen = choosen[:K]
base = sum(d for _,_,d in choosen)
kinds = len(choosen)

tl = list(itertools.islice(left.values(), K))
fixed = tl[:K - len(choosen)]
cands = tl[K - len(choosen):]
base += sum(d for _,_,d in fixed)

score = base + kinds**2

if cands:
    comp = []
    while cands and cands[0][2] > choosen[-1][2]:
        base_n = base
        base_n -= choosen[-1][2]
        base_n += cands[0][2]
        kinds_n = kinds - 1
        
        score_n = base_n + kinds_n**2
        if score_n > score:
            choosen = choosen[:-1]
            fixed += cands[0]
            cands = cands[1:]
            base, kinds, score = base_n, kinds_n, score_n
        else:
            break
print(score)    

### FIXED CODE ###

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

from itertools import islice
import operator

N, K = map(int, input().split())
sushi = [tuple([i] + [int(x) for x in input().split()]) for i in range(N)]
sushi.sort(key=operator.itemgetter(2), reverse=True)

from collections import OrderedDict, deque, Counter
left = OrderedDict((x[0], x) for x in sushi)

base = 0
choosen = [None] * N
choosen_kind = set()
ci = 0
for x in sushi:
    i, t, _ = x
    if t not in choosen_kind:
        choosen[ci] = x
        ci += 1
        choosen_kind.add(t)
        del left[i]

choosen = choosen[:min(ci, K)]
base = sum(d for _,_,d in choosen)
kinds = len(choosen)

cands = islice(left.values(), K)
fixed = islice(cands, K - len(choosen))
base += sum(d for _,_,d in fixed)

score = base + kinds**2

for cand in cands:
    if cand[2] <= choosen[-1][2]:
        break

    base_n = base
    base_n -= choosen[-1][2]
    base_n += cand[2]
    kinds_n = kinds - 1
    
    score_n = base_n + kinds_n**2
    if score_n > score:
        choosen.pop()
        base, kinds, score = base_n, kinds_n, score_n
    else:
        break

print(score)
from sys import stdin
import math
columns = int(stdin.readline().rstrip())
datas = [stdin.readline().rstrip().split() for _ in range(columns)]
for data in datas:
    A = int(data[0])
    B = int(data[1])
    C = int(data[2])
    D = int(data[3])
    if A < B:
        print("No")
        continue
    if D < B:
        print("No")
        continue
    if C > B:
        print("Yes")
        continue
    g = math.gcd(B,D)
    if (B - g + A % g) >C :
        print("No")
    else:
        print("Yes")     
    


### FIXED CODE ###

from sys import stdin
from fractions import gcd
columns = int(stdin.readline().rstrip())
datas = [stdin.readline().rstrip().split() for _ in range(columns)]
for data in datas:
    A = int(data[0])
    B = int(data[1])
    C = int(data[2])
    D = int(data[3])
    if A < B:
        print("No")
        continue
    if D < B:
        print("No")
        continue
    if C > B:
        print("Yes")
        continue
    g = gcd(B,D)
    if (B - g + A % g) >C :
        print("No")
    else:
        print("Yes")
N,K=map(int, input().split())
p=list(map(int, input().split()))
kitai=[0]*N
kitaiwa=[0]*(N-K+1)
for i in range(N):
    kitai[i]=(p[i]+1)/2
if N==K:
    print(sum(kitai))
elif K==1:
    print(max(kitai))
else:
    for i in range(N-K+1):
        for j in range(K):
            kitaiwa[i]+=kitai[i+j]
    print(max(kitaiwa))

### FIXED CODE ###

S,T=map(str, input().split())
A,B=map(int, input().split())
U=input()

if U==S:
    print(A-1,B)
else:
    print(A,B-1)
a,b,c,d=map(int(),input().split())
print(max(0,min(a,c)-max(b,d))

### FIXED CODE ###

a,b,c,d=map(int,input().split())
print(max(0,min(b,d)-max(a,c)))
import sys


def solv(s):
    left, right = s.split('=')
    for i in range(10):
        i = str(i)
        l = left.replace('X', i)
        r = right.replace('X', i)
        l1, l2 = l.split('+')
        if l1[0] == '0' or l2[0] == '0' or r[0] == '0':
            next
        if eval(l) == int(r):
            return i
    else:
        return 'NA'


for line in sys.stdin:
    print solv(line.rstrip('\n'))

### FIXED CODE ###


import sys


def solv(s):
    for i in range(10):
        i = str(i)
        s2 = s.replace('X', i)
        left, right = s2.split('=')
        l1, l2 = left.split('+')
        if any([x[0] == '0' and len(x) > 1 for x in [l1, l2, right]]):
            continue
        if int(l1) + int(l2) == int(right):
            return i
    else:
        return 'NA'


for line in sys.stdin:
    print solv(line.rstrip('\n'))
#!/usr/bin/env python

N = input()

n = int(N)

list1 = list(range(n))

for i in range(n) :
	list1[i] = list1[i] + 1

#print(list1)

list2 = []

for i in range(n) :
	list2.append(input())

list2 = [int(n) for n in list2]

#print(list2)

judge = 0

for i in range(n) : 
	if list1[i] != list2[i] :
		judge = judge + 1

if judge <= 2 :
	print('YES')

else :
	print('NO') 






### FIXED CODE ###

#!/usr/bin/env python

N = input()

n = int(N)

list1 = list(range(n))

for i in range(n) :
	list1[i] = list1[i] + 1

#print(list1)

list2 = []

list2 = input().split()  

list2 = [int(n) for n in list2]

#print(list2)

judge = 0

for i in range(n) : 
	if list1[i] != list2[i] :
		judge = judge + 1

if judge <= 2 :
	print('YES')

else :
	print('NO')
import math
from functools import reduce
n=int(input())
a=list(map(int,input().split()))
soin = [0]*(10**5+1)


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            while temp % i == 0:
                temp //= i
            arr.append(i)

    if temp != 1:
        arr.append(temp)

    if arr == []:
        arr.append(n)

    return arr


if len(a)>78498:
    ans=a[0]
    for i in a:
        ans=math.gcd(ans,i)
    if ans==1:
        print("setwise coprime")
    else:
        print("not coprime")
else:
    for i in a:
        for num in factorization(i):
            soin[num]+=1
    if max(soin)==1:
        print("pairwise coprime")
    elif max(soin)==n:
        print("not coprime")
    else:print("setwise coprime")


### FIXED CODE ###

import math
n=int(input())
a=list(map(int,input().split()))
soin = [0]*(10**6+1)
if a.count(1)==n:
    print("pairwise coprime")
    exit()

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            while temp % i == 0:
                temp //= i
            arr.append(i)

    if temp != 1:
        arr.append(temp)

    if arr == []:
        arr.append(n)

    return arr


if len(a)>80000:
    ans=a[0]
    for i in a:
        ans=math.gcd(ans,i)
    if ans==1:
        print("setwise coprime")
    else:
        print("not coprime")
else:
    for i in a:
        if i ==1:continue
        for num in factorization(i):
            soin[num]+=1
    if max(soin)==1:
        print("pairwise coprime")
    elif max(soin)==n and 1 not in a:
        print("not coprime")
    else:print("setwise coprime")
a, b, c = map((int, input().split()))
if (a==b+c) or (b==c+a) or (c==a+b):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a, b, c = map(int, input().split())
if (a==b+c) or (b==c+a) or (c==a+b):
    print("Yes")
else:
    print("No")
w = input()
cnt = 0
while(True):
    t = input()
    if t == "END_OF_TEXT":
        break
    t = t.lower
    t = list(t.split())
    for i in t:
        if i == w:
            cnt += 1
print(cnt)


### FIXED CODE ###

w = input()
cnt = 0
while(True):
    t = input()
    if t == "END_OF_TEXT":
        break
    t = t.lower().split()
    for i in t:
        if i == w:
            cnt += 1
print(cnt)
_=int(input())
s=input()
mod=7+10**9
def dp(t,l):
    if len(t)==1:
        if t[0] in l:
            return 1
        else:
            return 2
    if t[0] in l:
        return dp(t[1:],l)%mod
    else:
        ans=dp(t[1:],l+[t[0]])+dp(t[1:],l)
        ans%=mod
        return ans
print(dp(s,[])-1)

### FIXED CODE ###

_=input()
s=input()
mod=7+10**9
ans=1
for i in range(26):
    ans*=1+s.count(chr(ord('a') + i))
    ans%=mod
print(ans-1)
tmp = raw_input()
s = map(int, list(set(raw_input().split())).sort())
tmp = raw_input()
t = map(int, raw_input().split().sort())

ans = 0

for i in t:
	i = 0
	while i <= s[i]
		if i == s[i]: ans+= 1
		i += 1
print ans

### FIXED CODE ###

input()
l = raw_input().split()
input()
print len(set(l) & set(raw_input().split()))
import numpy as np
n = int(input())
fs = []
for _ in range(n):
    r = list(input())
    r = [ord(s) - ord("a") for s in r]    
    fs.append(r)
fs = np.array(fs)
sym = np.zeros((n,n))
cnt = 0
# di,dj とdi+1,dj+1が同値
# dj側は0で固定して良い
for di in range(n):
    for i in range(n):
        for j in range(n):
            sym[(i+di)%n][j] = fs[i][j]
    if (sym == sym.T).all():
        cnt += n
print(cnt)


### FIXED CODE ###

n = int(input())
fs = []
for _ in range(n):
    r = list(input())
    r = [ord(s) - ord("a") for s in r]    
    fs.append(r)
sym = [[0]*n for i in range(n)]
cnt = 0
# di,dj とdi+1,dj+1が同値
# dj側は0で固定して良い
for di in range(n):
    for i in range(n):
        for j in range(n):
            sym[(i+di)%n][j] = fs[i][j]
    flg = True
    for i in range(n):
        for j in range(i+1,n):
            if sym[i][j] != sym[j][i]:
                flg = False
                break
    if flg:
        cnt += n
print(cnt)
i = 1
while True :
  x = int(input())
  if x = = 0 :
    break
  print('Case',i':',x)
  i = i + 1
  


### FIXED CODE ###

i = 1
while True :
  x = int(input())
  if x == 0 :
    break
  print('Case ',i,': ',x,sep='')
  i += 1