Harryxun/stf_run huggingface dataset:
n = int(input())

remind = []
for i in range(n):
   remind.append(input())

egara = ["S ", "H ", "C ", "D "]
for i in range(4):
   for j in range(1, 14):
      if egara[i] + str(j) not in a:
         print(egara[i] + str(j))


### FIXED CODE ###

n = int(input())

remind = []
for i in range(n):
   remind.append(input())

egara = ["S ", "H ", "C ", "D "]
for i in range(4):
   for j in range(1, 14):
      if egara[i] + str(j) not in remind:
         print(egara[i] + str(j))
import sys
from collections import namedtuple, defaultdict
from math import gcd
input = sys.stdin.readline

class Point:
    def __init__(self, x, y):
        g = gcd(abs(x), abs(y))

        x //= g
        y //= g

        if x < 0:
            x *= -1
            y *= -1

        self.x = x
        self.y = y

    def __eq__(self, other):
        return self.x == other.x and self.y == other.y

    def __hash__(self):
        return hash((self.x, self.y))

    def __repr__(self):
        return f'({self.x}, {self.y})'

def main():
    n = int(input())
    
    p = []
    d = defaultdict(lambda: 0)

    for _ in range(n):
        x, y = map(int, input().split())


        p.append(Point(x, y))
        d[p[-1]] += 1

    # print(d)

    MOD = 10 ** 9 + 7

    pw = [ pow(2, i, MOD) for i in range(n + 1) ]

    ans = 1
    tot = 0

    # pair = 0
    # for x in range(n):
    #     for y in range(x + 1, n):
    #         if p[x].x * p[y].x + p[x].y * p[y].y == 0:
    #             pair += 1

    # print(f'pairs = {pair}')

    for x in d.keys():
        if x.x > 0 and x.y >= 0 and x in d and Point(-x.y, x.x) in d:
            s = d[x]
            t = d[Point(-x.y, x.x)]

            # print(s, t)

            tot += s + t
            value = (pw[s] + pw[t] - 1 + MOD) % MOD
            ans = ans * value % MOD

    # print(f'tot={tot}, n={n}')

    ans = ans * pw[n - tot] % MOD
    ans = (ans - 1 + MOD) % MOD

    print(ans)
main()


### FIXED CODE ###

import sys
from collections import namedtuple, defaultdict
from math import gcd
input = sys.stdin.readline

class Point:
    def __init__(self, x, y):
        g = gcd(abs(x), abs(y))

        x //= g
        y //= g

        if x < 0:
            x *= -1
            y *= -1

        elif x == 0 and y < 0:
            y *= -1

        self.x = x
        self.y = y

    def __eq__(self, other):
        return self.x == other.x and self.y == other.y

    def __hash__(self):
        return hash((self.x, self.y))

    def __repr__(self):
        return f'({self.x}, {self.y})'

def main():
    n = int(input())
    
    p = []
    d = defaultdict(lambda: 0)
    zeros = 0

    for _ in range(n):
        x, y = map(int, input().split())

        if x == 0 and y == 0:
            n -= 1
            zeros += 1
            continue

        p.append(Point(x, y))
        d[p[-1]] += 1

    MOD = 10 ** 9 + 7

    pw = [ pow(2, i, MOD) for i in range(n + 1) ]

    ans = 1
    tot = 0

    for x in d.keys():
        if x.x > 0 and x.y >= 0 and Point(-x.y, x.x) in d:
            s = d[x]
            t = d[Point(-x.y, x.x)]

            tot += s + t
            value = (pw[s] + pw[t] - 1 + MOD) % MOD
            ans = ans * value % MOD

    ans = ans * pw[n - tot] % MOD
    ans = (ans - 1 + MOD + zeros) % MOD

    print(ans)
main()
from math import gcd
from itertools import permutations

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

l = set(gcd(x, y) for x, y in list(permutations(a, 2)))
if 1 in l:
    remove(1)
print(min(l))

### FIXED CODE ###

from fractions import gcd
from itertools import accumulate

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

b = list(accumulate([0] + a, gcd))
c = list(accumulate([0] + a[::-1], gcd))
l = list(gcd(s, t) for s, t in zip(b[:-1], c[::-1][1:]))
print(max(l))
#!/usr/bin/python

import sys


def main():
  length = int(raw_input())
  elements = map(int, raw_input().split())
  print(" ".join(str(i) for i in elements))

  sorted_list = [elements[0]]
  for i in range(1, length):
    element = elements[i]
    for j in range(0, len(sorted_list) + 1):
      if j == len(sorted_list):
        sorted_list.append(element)
        break
      elif element < sorted_list[j]:
        sorted_list.insert(j, element)
        break
    output_list = sorted_list[0:i+1] + elements[i+1:]
    print(" ".join([str(i) for i in output_list]))

    return 0

if __name__ == '__main__':
  main()

### FIXED CODE ###

#!/usr/bin/python

import sys


def main():
  length = int(input())
  elements = list(map(int, input().split()))
  print(" ".join(str(i) for i in elements))

  sorted_list = [elements[0]]
  for i in range(1, length):
    element = elements[i]
    for j in range(0, len(sorted_list) + 1):
      if j == len(sorted_list):
        sorted_list.append(element)
      elif element < sorted_list[j]:
        sorted_list.insert(j, element)
        break
    output_list = sorted_list[0:i+1] + elements[i+1:]
    print(" ".join([str(i) for i in output_list]))

  return 0

if __name__ == '__main__':
  main()
A,B=map(int,input().split())
print('Possible') if A%3==0or B%3==0or(A+B)%3==0 else print('Impossible')

### FIXED CODE ###

A,B=map(int,input().split())
print('Possible') if A%3==0 or B%3==0 or(A+B)%3==0 else print('Impossible')
ptint(int(input())//3)

### FIXED CODE ###

print(int(input())//3)
s = input()
K = int(input())
n = len(s)

x = dict()
y = []
for i in range(5000):
    y.append([])

#O(N^2)
"""
for i in range(n):
    t = ""
    for j in range(i,n):
        t += s[j]
        if len(t) in x:
            if t not in y[len(t)]:
                y[len(t)].append(t)
        else:
            x[len(t)] = t
            y[len(t)].append(t)
X = []
for i in range(5000):
    if len(y[i]) == 0:
        continue
    y[i].sort()
    for j in range(len(y[i])):
        X.append(y[i][j])
"""
for i in range(n):
    t = ""
    for j in range(i,i+1+K):
        if j >= (n-1):
            break
        t += s[j]
        x[t] = t
X = []
for i in x:
    X.append(i)
X.sort()


#print(X)
print(X[K-1])

### FIXED CODE ###

s = input()
K = int(input())
n = len(s)

x = dict()
y = []
for i in range(5000):
    y.append([])

#O(N^2)
"""
for i in range(n):
    t = ""
    for j in range(i,n):
        t += s[j]
        if len(t) in x:
            if t not in y[len(t)]:
                y[len(t)].append(t)
        else:
            x[len(t)] = t
            y[len(t)].append(t)
X = []
for i in range(5000):
    if len(y[i]) == 0:
        continue
    y[i].sort()
    for j in range(len(y[i])):
        X.append(y[i][j])
"""
for i in range(n):
    t = ""
    for j in range(i,i+1+K):
        if j > (n-1):
            break
        t += s[j]
        x[t] = t
X = []
for i in x:
    X.append(i)
X.sort()


#print(X)
print(X[K-1])
import cmath

li = list(map(int,input().split()))
a = cmath.sqrt(li[0])
b = cmath.sqrt(li[1])
c = cmath.sqrt(li[2])
if(a+b < c):
  print('Yes')
else:
  print('No')

### FIXED CODE ###

import math

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

x = c - a - b
if(x <= 0):
  print('No')
elif(4 * a * b < x ** 2):
  print('Yes')
else:
  print('No')
import sys
input = sys.stdin.readline

s = list(input().strip())
q=int(input())
for i in range(q):
    L = list(input().rstrip().split())    
    if L[0]=='1':
        s.reverse()
    else:
        a,b,c = L
        if int(b)==2:
            s.append(c)
        else:
            s.insert(0,c)
            s = "".join(s)
print(s)
            
            


### FIXED CODE ###

import sys
from collections import deque
input = sys.stdin.readline

s = deque(input().strip())
q=int(input())
count = 0
for i in range(q):
    L = list(input().rstrip().split())    
    if L[0]=='1':
        count += 1
    else:
        a,b,c = L
        b = int(b)
        if count&1==1:
            b=3-b
        if b==2:
            s.append(c)
        else:
            s.appendleft(c)
if count&1==1:
    print("".join(list(s)[::-1])) 
else:
    print("".join(s))
N = int(input())
A = list(map(int, input().split()))
from functools import lru_cache
import sys
sys.setrecursionlimit(10**5+10) 

@lru_cache(None)
def up(i,pre):
    if i == len(A) - 1:
        return abs(A[pre] - A[i])
    res1 = res2 = float("inf")
    res1 = up(i + 1,i)
    if i + 2 <=len(A) -1: 
        res2 = up(i + 2,i)
    return min(abs(A[pre] - A[i]) + res1,abs(A[pre] - A[i]) + res2)

if N > 2:
    print(min(up(1,0),up(2,0)))
else:
    print(up(1,0))

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
dp = [0 for _ in range(len(A))]
dp[0] = 0 
for i in range(1,N):
    if i - 2>=0:
        dp[i] = min(dp[i-1] + abs(A[i] - A[i-1]),dp[i-2] + abs(A[i] - A[i-2]))
    else:
        dp[i] =dp[i-1] + abs(A[i] - A[i-1])

print(dp[len(A)-1])
n = int(input())
s = input()

black_start = s.find("#")
black_end = s.rfind("#")

white_start = s[black_start:].find(".")
white_end = s[black_start:].rfind(".")

black = s[black_start:].count("#")
white = s[black_start:].count(".")

if black == 0 or white ==0:
    print(0)
else:
    if white_end < black_end:
        print(black-1)
    else:
        print(min(black, white))

### FIXED CODE ###

a, b, c = map(int, input().split())
if (b-c) * (c-a) > 0:
    print("Yes")
else:
    print("No")
A,B = map(int, input().split())
a,b = int(input().split('-'))
if len(a) == A and len(b) == B:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

A,B = map(int, input().split())
a= input().split('-')
if len(a[0]) == A and len(a[1]) == B:
  print('Yes')
else:
  print('No')
x,y=map(int,input().split())
 
for i in range(x+1):
  if i*4+(x-i)*2==y:
    print("Yes")
    break   
else:
  print("No")

### FIXED CODE ###

arr=list(map(int,input().split()))

print(arr.index(0)+1)
N,K = map(int, input().split())
trees = [int(input()) for _ in range(N)]

trees.sort()

print(min([max_h-min_h for min_h,max_h in zip(trees,trees[K-1:])]))

### FIXED CODE ###

D = int(input())
names = {
	25:'Christmas', 
	24:'Christmas Eve', 
	23:'Christmas Eve Eve', 
	22:'Christmas Eve Eve Eve'
  }

print(names[D])
X,Y = map(int,input().split())
c = 4*x - y
if(c>=0 and c%2==0):
  print('YES')
else:
  print('NO')

### FIXED CODE ###

X,Y =map(int, input().split())

if (X>=Y or Y%2 or Y>4*X or Y<2*X):
  print('No')
elif(Y<=4*X and Y>=2*X):
  print('Yes')
n = int(input())
a = list(map(int, input().split()))

sums = 0
for i in range(n-1):
    for j in range(i+1, n):
        sums += (a[i] * a[j])

print(sums % (10 ** 9 + 7))


### FIXED CODE ###

s = input()
t = input()


ans = len(t)


for i in range(len(s)-len(t)+1):
    dif = 0
    for j in range(len(t)):
        if t[j] != s[i+j]:
            dif += 1

    ans = min(ans, dif)

print(ans)

# for i in range(len(t)+1, 0, -1):
#    for j in range(0, len(t)-i+1):
#        sb = t[j:j+i]
#        if sb in s[j:]:
#            print(sb, s[j:])
#            ans = len(t)-len(sb)
#            flag = True
#            break
#
#    if flag:
#        break
import itertools

L,R = map(int,input().split())
N_List = list(range(L,R+1))
N = len(N_List)
if N >= 2019:
    ans = 0
else:
    F = N_List[0] % 2019
    L = N_List[-1] % 2019
    if F < L:
        ans = 2019
        Amari_List = list(range(F,L+1))
        for v1,v2 in itertools.combinations(Amari_List, 2):
            if v1*v2 < ans:
                ans = v1*v2
    else:
        ans = 0

print(ans)





### FIXED CODE ###

import itertools

L,R = map(int,input().split())
if R - L + 1 >= 2019:
    ans = 0
else:
    LL = L % 2019
    RR = R % 2019
    if LL < RR:
        Amari_List = list(range(LL,RR+1))
        ans = 2019
        for v1,v2 in itertools.combinations(Amari_List, 2):
            ca = (v1*v2) % 2019 
            if  ca < ans:
                ans = ca
    else:
        ans = 0

print(ans)
A = int(input())
P = int(input())

ans = (A*3+P)//2

print(ans)


### FIXED CODE ###

A, P = (int(x) for x in input().split())
print((3*A + P) // 2)
n=int(input())
p=map(int, input().split())
cnt=0

for i in range(n-2):
  l=p[i:i+2]
  if l[0]>=l[1] and l[1]>=l[2]:
    cnt+=1
  if l[2]>=l[1] and l[1]>=l[0]:
    cnt+=1

print (cnt)

### FIXED CODE ###

n=int(input())
p=input().split()  
p=list(map(int,p))          
cnt=0

for i in range(n-2):
  l=p[i:i+3]
  if l[0]>=l[1] and l[1]>=l[2]:
    cnt+=1
  if l[2]>=l[1] and l[1]>=l[0]:
    cnt+=1

print (cnt)
A,B=map(int,input().split())
c=a*b
print(c)

### FIXED CODE ###

a,b = map(int,input().split())
c = a*b
print(int(c))
S = input()
ans = 0
for c in S:
  if c == '+':
  	ans += 1
  else c == '-':
    ans -= 1
print(ans)

### FIXED CODE ###

S = input()
ans = 0
for c in S:
  if c == '+':
  	ans += 1
  elif c == '-':
    ans -= 1
print(ans)
import math
 
n = m = int(raw_input())
r = int(math.sqrt(n))
sqrt = int(math.sqrt(r))
p = [1]*r
p[0] = 0
for i in range(1,sqrt):
    if p[i]:
        p[2*i+1::i+1] = [0 for x in range(2*i+1,r,i+1)]
  
prime=[]
for i in range(r):
    if p[i]:
        prime.append(i+1)

a = []
for i in range(len(prime)):
    if n % prime[i] == 0:
        a.append(prime[i])
        n /= prime[i]
        
if n != 1:
    a.append(n)

count = 0
for i in range(m):
    flag = 1
    for j in a:
        if i%j == 0:
            flag = 0
            break
    if flag == 1:
        count += 1

print count

### FIXED CODE ###

def phi(n):
	r = n
	i = 2
	while i*i <= n:
		if n%i==0:
			r -= r/i
			while n%i==0:
				n /= i
		i += 1
	if n>1: r-= r/n
	return r

n = int(raw_input())
print phi(n)
import sys
sys.setrecursionlimit(2000)
s=input()
n=len(s)
def mod10(x):
    p=x//100
    q=x%100
    if p==0:
        return (10**q)%2019
    return (mod10(q)+mod10(p))%2019


def T(i):
    if i==n-1:
        return int(s[n-1])
    return T(i+1)+10**(n-1-i)*int(s[i])
dict={}
def modi(i,dict):
    if i in dict.keys():
        return dict[i]
    else:
        if i==n-1:
            dict[i]=int(s[i])
            return int(s[i])
        else:
           # c=modi(i+1,dict)+(10**(n-1-i)*int(s[i]))
            c=modi(i+1,dict)+(mod10(n-1-i)*int(s[i]))
            c=c%2019
            dict[i]=c
            return c

modnum={}
for i in range(n):
    #print(T(i))
    if int(s[i])==0:
        continue
    x=modi(i,dict)
 #   print(T(i),x)
    if x not in modnum.keys():
        modnum[x]=1
    else:
        modnum[x]+=1
sum=0
for md in modnum.keys():
    a=modnum[md]
    if md==0:
        sum+=a
        sum+=-(a*(a-1)//2)
   # print(a*(a-1)//2)
    sum+=a*(a-1)//2
#print(modnum)
print(sum)


### FIXED CODE ###

import sys
import collections as coun
sys.setrecursionlimit(10000000)
s=input()
n=len(s)
def mod10(x):
    return (10**(x%224))%2019
dp=[-1]*n
tmp=0
for i in reversed(range(n)):
    if i==n-1:
        dp[i]=int(s[i])
    else:
        dp[i]=(dp[i+1]+int(s[i])*pow(10,n-1-i,2019))%2019

#print(dp)
p=-1
for i in range(len(dp)-1):
    if dp[i]==dp[i+1]:
        dp[i]=p
        p=p-1

#print(dp)

c=coun.Counter(dp)
sum=0
for v in c.values():
    sum+=v*(v-1)//2
#print(sum)
for i in dp:
    if i==0:
        sum+=1
#print(sum)
if dp[-1]==0:
    sum=sum-1
print(sum)
import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines

import numpy as np

N = int(readline())
A = np.array(readline().split(),np.int32)

def test(x):
    # 答はx以上
    B = (A >= x)
    # 連番の左側にフラグを立てる
    flag = np.zeros(N+N-1,np.bool)
    flag[:-1] = (B[:-1] == B[1:])
    # 最寄りの連番を探す
    L = np.where(flag[:N])[0].max(initial=-1) + 1
    R = np.where(flag[N-1:-1])[0].min(initial=N-2) + N
    if (N-1)-L > R-(N-1):
        return B[R]
    else:
        return B[L]

left = 0 # 答はleft以上
right = N+10 # 答はright未満
while left + 1 < right:
    mid = (left + right)//2
    if test(mid):
        left = mid
    else:
        right = mid
answer = left
print(answer)


### FIXED CODE ###

import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines

import numpy as np

N = int(readline())
A = np.array(readline().split(),np.int32)

def test(x):
    # 答はx以上
    B = (A >= x)
    # 連番の左側にフラグを立てる
    flag = np.zeros(N+N-1,np.bool)
    flag[:-1] = (B[:-1] == B[1:])
    # 最寄りの連番を探す
    """ version違いでボツ
    L = np.where(flag[:N])[0].max(initial=-1) + 1
    R = np.where(flag[N-1:-1])[0].min(initial=N-1) + N - 1
    """
    x = np.where(flag[:N])[0]
    L = x.max() + 1 if len(x) >= 1 else 0
    x = np.where(flag[N-1:-1])[0]
    R = x.min() + N - 1 if len(x) >= 1 else N+N-2
    if (N-1)-L > R-(N-1):
        return B[R]
    else:
        return B[L]

left = 0 # 答はleft以上
right = N+N+10 # 答はright未満
while left + 1 < right:
    mid = (left + right)//2
    if test(mid):
        left = mid
    else:
        right = mid
answer = left
print(answer)
import numpy as np

K,N=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
x=np.array(A[1:])
y=np.array(A[:-1])
B=x-y
B.append(K+A[0]-A[N-1])
print(K-int(max(B))

### FIXED CODE ###

import numpy as np

K,N=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
x=np.array(A[1:])
y=np.array(A[:-1])
B=x-y
C=B.tolist()
C.append(K+A[0]-A[N-1])
print(K-int(max(C)))
S = input()

L = S.split("/")

L[0] = "2018"

print(L[0]+"/"L[1]+"/"L[2])

### FIXED CODE ###

S = input()

L = S.split("/")

L[0] = "2018"

print(L[0]+"/"+L[1]+"/"+L[2])
N=input()
ans=0
for i in range(1,N):
    count=0
    for j in range(i):
        if i%j==0:
            count+=1
    if count==9:
        ans+=1
        
print(ans)

### FIXED CODE ###

N=int(input())
ans=0
for i in range(1,N+1):
    count=0
    for j in range(1,i+1):
        if i%j==0:
            count+=1
    if count==8 and i%2!=0:
        ans+=1
        
print(ans)
w, h, n = map(int, input().split())
xl, xr = 0, w
yd, yu = 0, h
for i in range(n):
    x, y, a = map(int, input().split())
    if a == 1:
        if x < xl:
            continue
        elif xl <= x <= xr:
            xl = x
        else:
            xl, xr = 0
    elif a == 2:
        if xr < x:
            continue
        elif xl <= x <= xr:
            xr = x
        else:
            xl, xr = 0, 0
    elif a == 3:
        if y < yd:
            continue
        elif yd <= y <= yu:
            yd = y
        else:
            yd, yu = 0, 0
    elif a == 4:
        if y > yu:
            continue
        elif yd <= y <= yu:
            yu = y
        else:
            yd, yu = 0, 0

print((xr - xl) * (yu - yd))

### FIXED CODE ###

w,h,n=map(int,input().split())
x1,x2=0,w
y1,y2=0,h
for i in range(n):
    x,y,a=map(int,input().split())
    if a==1:
        x1 = max(x1,x)
    elif a==2:
        x2 = min(x2,x)
    elif a==3:
        y1 = max(y1,y)
    elif a==4:
        y2 = min(y2,y)
print(max((x2-x1)*(y2-y1),0) if x2-x1>0 else 0)
s=list(input().split())

a=int(s[0])
b=int(s[1])
c=int(s[2])
if a==1:
        d=1
else:
        d=0

if b==1:
        d+=1

if c==1:
        d+=1

 
print(d)

### FIXED CODE ###


s=list(input().split())
total=0

for digit in str(s):
 if digit=='1':
        total += 1

print(total)
input()
    ms=[int(i) for i in input().split()]
    c=0
    d=0
    for m in ms:
      if m<=c:
        c=m
        d+=1
    print(d)

### FIXED CODE ###

input()
ms=[int(i) for i in input().split()]
c=d=0
for m in ms:
 if c<=m:
  c=m
  d+=1
print(d)
for i in range(1,10):
   for j in range(1,10):
      ans = i * j
      print('%dx%d=%D'%(i,j,k))

### FIXED CODE ###

for i in range(1,10):
    for j in range(1,10):
        ans = i * j
        print('%dx%d=%d' % (i,j,ans))
N = int(input())
N1 = N % 10
if N1 ==3:
  print('bon')
elif N1 == 0,1,6,8:
  print('pon')
else:
  print('hon')


### FIXED CODE ###

N = int(input())
N1 = N % 10
if N1 ==3:
  print('bon')
elif N1 == 0 or N1==1 or N1== 6 or N1 == 8:
  print('pon')
else:
  print('hon')
import numpy as np

XY = np.asarray(input().split(), dtype=int)
X = np.asarray(input().split(), dtype=int)
Y = np.asarray(input().split(), dtype=int)

if np,sum(X==XY[2]) == 1 or np,sum(Y==XY[3]) == 1:
    print("no war")
elif np.max(X) <= np.min(Y):
    print("no war")
else:
    print("war"




### FIXED CODE ###

N, K, A, B = list(map(int, input().split()))
A_max = max(list(map(int, input().split())))
B_min = min(list(map(int, input().split())))

if A_max > A and B_min <= B and A_max < B_min:
  print("No War")
else:
  print("War")
import math
import heapq
A,B = list(map(int,input().split()))
GCD = math.gcd(A,B)
CD = []
for i in range(1,int(GCD**(0.5))+1):
    if GCD % i == 0:
        CD.append(i)
        if not i == GCD//i:
            CD.append(GCD//i)
CD.sort()
ans = 1
tmp_idx = 0
CD.pop(0)
CD_old = CD[:]
while (len(CD_old)>0):
    tmp = CD_old.pop(0)
    CD_new = []
    for i in range(len(CD_old)):
        if not CD_old[i] % tmp == 0:
            CD_new.append(CD_old[i])
    ans += 1
    CD_old = CD_new
print(ans)

### FIXED CODE ###

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

A,B = list(map(int,input().split()))
GCD = gcd(A,B)
CD = []
for i in range(1,int(GCD**(0.5))+1):
    if GCD % i == 0:
        CD.append(i)
        if not i == GCD//i:
            CD.append(GCD//i)
CD.sort()
ans = 1
tmp_idx = 0
CD.pop(0)
CD_old = CD[:]
while (len(CD_old)>0):
    tmp = CD_old.pop(0)
    CD_new = []
    for i in range(len(CD_old)):
        if not CD_old[i] % tmp == 0:
            CD_new.append(CD_old[i])
    ans += 1
    CD_old = CD_new
print(ans)
n,a,b=map(int,input().split())
if a==0:
    print(0)
else:
    blue=['b']*a
    red=['r']*b
    s=blue+red
    print(s[:n%(a+b)].count('b') + a*(n//(a+b)))

### FIXED CODE ###

n,a,b=map(int,input().split())
if a==0:
    print(0)
else:
    ans=(min(n%(a+b),a) + (a*(n//(a+b))))
    print(ans)
r = input()
ans = r * r
print(ans)


### FIXED CODE ###

r = int(input())
ans = r * r
print(ans)
def resolve():
	n, m = map(int, input().split())
	mod = 10**9+7
	if abs(n - m) > 1:
		print(0)
		return
	a = factorial(m) % mod * factorial(n) % mod
	if (n + m) % 2 == 0:
		a = a * 2 % mod
	print(a)
resolve()

### FIXED CODE ###

from math import factorial

def resolve():
	n, m = map(int, input().split())
	mod = 10**9+7
	if abs(n - m) > 1:
		print(0)
		return
	a = factorial(m) % mod * factorial(n) % mod
	if (n + m) % 2 == 0:
		a = a * 2 % mod
	print(a)
resolve()
H, M, X, Y = map(int, input().split())
x = map(int, input().split())
y = map(int, input().split())
for z in range(x+1, y+1):
  r = any(i < z for i in x) and any(i < z for i in y)
  if r:
    print("No War")
    break
  else:
    print("War")

### FIXED CODE ###

H, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
 
r = any(all(i < z for i in x) and all(i >= z for i in y) for z in range(X+1, Y+1))
print("No War" if r else "War")
a, b, c, d = [int(i) for i in input().split()]

if abs(a-c) <= d:
    print('Yes')
elif abs(a-b) <= d and abs()-c) <= d:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

a, b, c, d = [int(i) for i in input().split()]

if abs(a-c) <= d:
    print('Yes')
elif abs(a-b) <= d and abs(b-c) <= d:
    print('Yes')
else:
    print('No')
N = input()
sum=0
for i in range(int(N)):
	sum += int(i)
print('Yes' if int(N) // sum == 0 else 'No')

### FIXED CODE ###

n = input()
print("Yes" if int(n) % sum(map(int,n)) == 0 else "No")
# -*- coding: utf-8 -*-

from collections import defaultdict

#入力   
n = int(input())
v = list(int, input().split())

def f(v):
    d = defaultdict(int)
    d[0] = 0

    for i in v:
        d[i] += 1
    return sorted(d.items(), key=lambda x: x[1], reverse=True)

t1 = f(v[::2])
t2 = f(v[1::2])

if t1[0][0] == t2[0][0]:
    if t1[0][1] + t2[1][1] > t1[1][1] + t2[0][1]:
        print(n - t1[0][1] - t2[1][1])
    else:
        print(n - t1[1][1] - t2[0][1])
else:
    print(n - t1[0][1] - t2[0][1])

### FIXED CODE ###

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

from collections import defaultdict

#入力   
n = int(input())
v = tuple(int(i) for i in input().split())

def f(v):
    d = defaultdict(int)
    d[0] = 0

    for i in v:
        d[i] += 1
    return sorted(d.items(), key=lambda x: x[1], reverse=True)

t1 = f(v[::2])
t2 = f(v[1::2])

if t1[0][0] == t2[0][0]:
    if t1[0][1] + t2[1][1] > t1[1][1] + t2[0][1]:
        print(n - t1[0][1] - t2[1][1])
    else:
        print(n - t1[1][1] - t2[0][1])
else:
    print(n - t1[0][1] - t2[0][1])