Harryxun/stf_run huggingface dataset:
n = int(input())
l = list(input().split())
ll,lr = l[::2],l[1::2]
dl,dr = {},{}
for i in ll: dl[i] = dl.get(i,0)+1
for j in lr: dr[j] = dr.get(j,0)+1
ltl = sorted(dl.items(),key=lambda k:-k[1])
ltr = sorted(dr.items(),key=lambda k:-k[1])
if ltl[0][0] != ltr[0][0]:
  print(n-ltl[0][1]-ltr[0][1])
elif len(ltl)<2:
  print(n//2)
else:
  print(n-ltl[0][1]-max(lt1[1][1],ltr[1][1]))

### FIXED CODE ###

n = int(input())
l = list(input().split())
ll,lr = l[::2],l[1::2]
dl,dr = {},{}
for i in ll: dl[i] = dl.get(i,0)+1
for j in lr: dr[j] = dr.get(j,0)+1
ltl = sorted(dl.items(),key=lambda k:-k[1])
ltr = sorted(dr.items(),key=lambda k:-k[1])
if ltl[0][0] != ltr[0][0]:
  print(n-ltl[0][1]-ltr[0][1])
elif len(ltl)<2:
  print(n//2)
else:
  print(n-ltl[0][1]-max(ltl[1][1],ltr[1][1]))
import copy

N = int(input())
An = [int(x) for x in input().split()]

for i in range(N):
    tmp = copy.copy(An)
    tmp.pop(i)
    
    c = 0
    for i in range(N):
        k = tmp.count(i)
        if k>1:
            c += int(math.factorial(k) / (math.factorial(k-2) * 2))
    print(c)

### FIXED CODE ###

import collections as c

# 入力
N = int(input())
An = [int(x) for x in input().split()]
 
# 各数字の個数を求める
Cn = c.Counter(An)
 
# 全部の組み合わせ
s = 0
for v in Cn.values():
    s += int(v*(v-1) / 2)

for i in range(0,N):
    print(s - (Cn[An[i]] - 1))
import sys
sys.setrecursionlimit(1000000)
import math
a, b = input().split()
c = int(math.floor(int(a) * float(b))
print(c)


### FIXED CODE ###

import sys
def input():
    return sys.stdin.readline()[:-1]
a, b= input().split()
a = int(a)
b = int(b.replace(".", ""))
# floatをそのまま掛け算すると大きい計算で誤差が生じるため、.を消してintにする。
output = a * b // 100
# 小数点は2桁までで確定なので、100で切り捨て除算する。
print(output)
x,m = map(int, input().split())
x = sorted(list(map(int, input().split())))

if n >= m:print(0)
else:
    dist = [abs(x[i+1] - x[i]) for i in range(m-1)]
    dist = sorted(dist)
    print(sum(dif[:-(n-1)]))

### FIXED CODE ###

n,m = map(int, input().split())
x = sorted(list(map(int, input().split())))

if n >= m:print(0)
else:
    dist = [abs(x[i+1] - x[i]) for i in range(m-1)]
    dist = sorted(dist)
    print(sum(dist[:m-n]))
import math

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

Max = int(math.gcd(A, B) )


list = [0] * 100

j =0

if A == 1 or B == 1:
    print("1")
    quit()

for i in range(Max):

    if i == 0:
        continue
    if Max % i == 0:
        list[j] = i
        j += 1


print(list[j - K+1])


### FIXED CODE ###

#import math

def gcd(m,n):
    x = max(m, n)
    y = min(m, n)
    if x%y == 0:
        return y
    else:
        while x%y!= 0:
            z = x%y
            x = y
            y =z
        else:
            return z


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

Max = int(gcd(A, B) )


list = [0] * 1000

j =0

if A == 1 or B == 1:
    print("1")
    quit()

for i in range(Max):

    if i == 0:
        continue
    if Max % i == 0:
        list[j] = i
        j += 1

if K == 1:
    print(Max)
    exit()

print(list[j - K+1])
n = int(input())
num_list = map(int, input().split())
def ave(nums):
    rev_sum = 0
    for i in nums:
        rev_sum += 1/i
    ans = 1/rev_sum
    return ans

print(ave(num_list))

### FIXED CODE ###

a = int(input()) 
s = str(input()) 
if a>= 3200: 
  print(s)
else:
  print("red")
import math

N = 5
ARR = [2, 4, 4, 0, 2]

N = 7
ARR = [6, 4, 0, 2, 4, 0, 2]

N = 8
ARR = [7, 5, 1, 1, 7, 3, 5, 3]

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


def calculate(n, arr):
    if n % 2 == 0:
        n = n // 2
        start = 1
        finalResult = pow(2, n, 1000000000 + 7)
    else:
        n = n // 2 + 1
        start = 0
        finalResult = pow(2, (n - 1), 1000000000 + 7)

    result = {}
    for i in range(n):
        index = start + 2 * i
        if index == 0:
            result.__setitem__(0, 1)
        else:
            result.__setitem__(index, 2)

    isOk = True
    for i in range(len(arr)):
        aa = result.get(arr[i])
        aa = aa - 1
        if aa < 0:
            isOk = False
            break
        result.__setitem__(arr[i], aa)

    if sum(result.values()) != 0:
        isOk = False

    if isOk:
        print(finalResult)
    else:
        print(0)


calculate(N, ARR)


### FIXED CODE ###

import math

N = 5
ARR = [2, 4, 4, 0, 2]

N = 7
ARR = [6, 4, 0, 2, 4, 0, 2]
#
# N = 8
# ARR = [7, 5, 1, 1, 7, 3, 5, 3]
#
N = int(input())
ARR = list(map(int, input().split()))


def calculate(n, arr):
    if n % 2 == 0:
        n = n // 2
        start = 1
        finalResult = pow(2, n, 1000000000 + 7)
    else:
        n = n // 2 + 1
        start = 0
        finalResult = pow(2, (n - 1), 1000000000 + 7)

    result = {}
    for i in range(n):
        index = start + 2 * i
        if index == 0:
            result.__setitem__(0, 1)
        else:
            result.__setitem__(index, 2)

    isOk = True
    for i in range(len(arr)):
        if result.get(arr[i]) == None:
            isOk = False
            break

        if result.get(arr[i]) == 0:
            isOk = False
            break

        result.__setitem__(arr[i], result.get(arr[i])-1)

    if isOk == False:
        print(0)
        return

    if sum(result.values()) == 0:
        print(finalResult)
    else:
        print(0)


calculate(N, ARR)
import bisect

X, Y, A, B, C = map(int, input().split())
red = list(map(int, input().split()))
green = list(map(int, input().split()))
clear = list(map(int, input().split()))

red.sort()
green.sort()
clear.sort()

red = red[-X:]
green = green[-Y:]

def ins(a, x):
    insert_index = bisect.bisect_left(a,x)
    a.insert(insert_index,x)
    return a[1:]

while clear[-1] > min(red[0], green[0]):
    red_tmp = ins(red.copy(), clear[-1])
    green_tmp = ins(green.copy(), clear[-1])
    
    if (sum(red_tmp) + sum(green)) >= (sum(red) + sum(green_tmp)):
        # 赤に追加
        red = red_tmp
    else:
        # 緑に追加
        green = green_tmp
        
    if len(clear) == 1:
        break
    else:
        clear = clear[:-1] #clearを消去

print(sum(red) + sum(green))

### FIXED CODE ###

# 1行、1変数を受け取るとき
s = list(input())

if (s[2] == s[3]) & (s[4] == s[5]):
    print("Yes")
else:
    print("No")
a=list(map(int,input().split()))
n,q,b,c=a[0],a[1],[],[]
s=input()
for i in range(q):
    b.append(list(map(int,input().split())))
for i in range(len(s)):
    if s[i]=='A' and s[i+1]=='C':
        c.append(1)
    else:
        c.append(0)
for i in range(q):
    print(sum(c[b[i][0]-1:b[i][1]-1]))

### FIXED CODE ###

def Csum(a):
    b,c=[0],0
    for i in range(len(a)-1):
        c+=(a[i]=='A' and a[i+1]=='C')
        b.append(c)
    return b
n,q=map(int,input().split())
s=Csum(input())
for i in range(q):
    a,b=map(int,input().split())
    print(s[b-1]-s[a-1])
10 15
SNCZWRCEWB
B R
R R
E R
W R
Z L
S R
Q L
W L
B R
C L
A L
N L
E R
Z L
S L

### FIXED CODE ###

n, q = map(int, input().split())
s = input()
ts, ds = [], []
for _ in range(q):
    t, d = input().split()
    ts.append(t)
    ds.append(d)

def reachable(n, dest):
    for t, d in zip(ts, ds):
        if s[n] == t:
            n = n - 1 if d == 'L' else n + 1
        if n == dest:
            return True
        elif not 0 <= n <= len(s) - 1:
            return False
    return False


l, r = -1, n
while r - l > 1:
    m = l + (r - l) // 2
    if reachable(m, -1):
        l = m
    else:
        r = m
ldel = l + 1

l, r = -1, n
while r - l > 1:
    m = l + (r - l) // 2
    if reachable(m, n):
        r = m
    else:
        l = m
rdel = n - r

print(max(n - (ldel + rdel), 0))
H, W = tuple(map(int, input().split(' ')))

grid = []
for i in range(0, H):
    grid.append(list(map(lambda x: True if x == '.' else False, list(input()))))

def get_arounds(x, y, max_x, max_y):
    arounds = [(x, y-1), (x+1, y), (x, y+1), (x-1, y)]
    return list(filter(lambda a: a[0] >= 0 and a[0] < max_x and
                                 a[1] >= 0 and a[1] < max_y, arounds))

def find_path(point, path, ignore, H, W):
    x = point[0]
    y = point[1]
    arounds = get_arounds(x, y, H, W)
    targets = list(filter(lambda x: not x in ignore, arounds))

    if len(targets) == 0:
        return [(False, path, ignore)]
    else:
        return [(True, path + [target], ignore + arounds)
                for target in targets]


ignore = []
for i in range(0, H):
    for j in range(0, W):
        if not grid[i][j]:
            ignore.append((i, j))

paths = [(True, [(0, 0)], ignore)]
s_path = []
while any([p[0] for p in paths]):
    print('.', endl='')
    next_paths = []
    for p in filter(lambda p: p[0], paths):
        if p[1][-1] == (H - 1, W - 1):
            s_path = p[1]
            break

        next_paths.extend(find_path(p[1][-1], p[1], p[2], H, W))
    paths = next_paths

if len(s_path) == 0:
    print(-1)
else:
    print(H * W - len(s_path) - len(ignore))


### FIXED CODE ###

from collections import deque


def get_arounds(point, grid, max_x, max_y):
    x = point[0]
    y = point[1]
    arounds = [(x + dx, y + dy) for dx, dy in ((0, -1), (1, 0), (0, 1), (-1, 0))]
    return list(filter(lambda a: 0 <= a[0] < max_x and
                                 0 <= a[1] < max_y and
                                 grid[a[0]][a[1]], arounds))


H, W = tuple(map(int, input().split()))

grid = []
for i in range(0, H):
    grid.append(list(map(lambda x: True if x == '.' else False, list(input()))))

black = sum(map(lambda l: l.count(False), grid))

grid[0][0] = False
p_grid = {(0, 0): 0}
queue = deque([(0, 0)])
while not len(queue) == 0:
    here = queue.popleft()
    if here == (H - 1, W - 1):
        break;
    arounds = get_arounds(here, grid, H, W)
    for a in arounds:
        grid[a[0]][a[1]] = False
        p_grid[a] = p_grid[here] + 1
    if not arounds:
        continue
    queue.extend(arounds)

if (H-1, W-1) in p_grid:
    print(H * W - (p_grid[H-1, W-1] + 1) - black)
else:
    print(-1)
d = int(input())

if d=25:
  print('Christmas')
elif d=24:
  print('Christmas Eve')
elif d=23:
  print('Christmas Eve Eve')
elif d=22:
  print('Christmas Eve Eve Eve')


### FIXED CODE ###

d = int(input())

if d==25:
  print('Christmas')
elif d==24:
  print('Christmas Eve')
elif d==23:
  print('Christmas Eve Eve')
elif d==22:
  print('Christmas Eve Eve Eve')
##### 解けた #####

import numpy as np

S=np.asarray(list(input()))
T=np.asarray(list(input()))
OKflag=False # 一致するかどうかを示すフラグ

for i in range(len(S)):
    Sr=np.roll(S,i) # ロールさせる
    
    if Sr==T: # 一致する場合、フラグを立てて終了
        OKflag=True
        break

if OKflag==True: # 回転させて一致するなら
    print("Yes")
else: # 一致しないなら
    print("No")

### FIXED CODE ###

##### 解けた #####

import numpy as np

S=np.asarray(list(input()))
T=np.asarray(list(input()))
OKflag=False # 一致するかどうかを示すフラグ

for i in range(len(S)):
    Sr=np.roll(S,i) # ロールさせる
    
    if (Sr==T).all(): # 一致する場合、フラグを立てて終了
        OKflag=True
        break

if OKflag==True: # 回転させて一致するなら
    print("Yes")
else: # 一致しないなら
    print("No")
s = list(input())
t = list(input())
s = sorted(s)
t = sorted(t,reverse=True)

for i in range(len(s)):
    if ord(s[i])<ord(t[i]):
        print("Yes")
        exit()
    elif ord(s[i])>ord(t[i]):
        print("No")
        exit()
else:
    if len(t)-len(s)>0:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

s = list(input())
t = list(input())
s = sorted(s)
t = sorted(t,reverse=True)
if s<t:
    print("Yes")
else:
    print("No")
package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

func gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

func main() {
	A := readInt()
	B := readInt()

	N := gcd(A, B)

	p := make([]bool, N+1)
	for i := 0; i < N+1; i++ {
		p[i] = true
	}
	p[0] = false
	p[1] = false
	n := int(math.Sqrt(float64(N)) + 1)
	for i := 4; i < N+1; i += 2 {
		p[i] = false
	}
	for i := 3; i < n+1; i += 2 {
		if p[i] {
			for j := i + i; j < N+1; j += i {
				p[j] = false
			}
		}
	}

	result := 1
	for i := 2; i < N+1; i++ {
		if N%i == 0 && p[i] {
			result++
		}
	}
	fmt.Println(result)
}

const (
	ioBufferSize = 1 * 1024 * 1024 // 1 MB
)

var stdinScanner = func() *bufio.Scanner {
	result := bufio.NewScanner(os.Stdin)
	result.Buffer(make([]byte, ioBufferSize), ioBufferSize)
	result.Split(bufio.ScanWords)
	return result
}()

func readString() string {
	stdinScanner.Scan()
	return stdinScanner.Text()
}

func readInt() int {
	result, err := strconv.Atoi(readString())
	if err != nil {
		panic(err)
	}
	return result
}


### FIXED CODE ###

from fractions import gcd
from math import sqrt


def prime_factorize(n):
    result = []
    for i in range(2, int(sqrt(n)) + 1):
        if n % i != 0:
            continue
        t = 0
        while n % i == 0:
            n //= i
            t += 1
        result.append((i, t))
        if n == 1:
            break
    if n != 1:
        result.append((n, 1))
    return result


A, B = map(int, input().split())
print(len(prime_factorize(gcd(A, B))) + 1)
A = map(int,input().split())
print(0.5*A[0]*A[1])

### FIXED CODE ###

A = list(map(int,input().split()))
print(A[0]*A[1]//2)
x,y,z=(input().split(" "))
if z == y:
  if y ==x:
    return "No"
  else:
    return "Yes"
else:
  if z ==x:
    return "Yes"
  else:
    if y == x:
      return "Yes"
    else:
      return "No"


### FIXED CODE ###

x,y,z=(input().split(" "))
if z == y:
  if y ==x:
    print("No")
  else:
    print("Yes")
else:
  if z ==x:
    print("Yes")
  else:
    if y == x:
      print("Yes")
    else:
      
      print("No")
N, A, B, C, D, E = map(int, input().split())
min=min(A, B, C, D, E)
print(-(-N//min))

### FIXED CODE ###

N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
min=min(A, B, C, D, E)
print(-(-N//min)+4)
n = int(input())
a = list(map(int, input().split()))

a.sort()

is_divisible = [-1] * (2 * (10 ** 5) + 1)
is_divisible[0] = False

ans = 0
for num in a:
    if is_divisible[num] == -1:
        ans += 1
        is_divisible[num] = 0
        for i in range(num * 2, 2 * (10 ** 5) + 1, num):
            is_divisible[i] = 1
    elif is_divisible[num] == 0:
        ans -= 1
        is_divisible[num] = 1
    else:
        continue

print(ans)


### FIXED CODE ###

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

a.sort()

is_divisible = [-1] * (10 ** 6 + 1)
is_divisible[0] = 1

ans = 0
for num in a:
    if is_divisible[num] == -1:
        ans += 1
        is_divisible[num] = 0
        for i in range(num * 2, 10 ** 6 + 1, num):
            is_divisible[i] = 1
    elif is_divisible[num] == 0:
        ans -= 1
        is_divisible[num] = 1
    else:
        continue

print(ans)
n,q = map(int, input().split())
edge = [[] for _ in range(n)]
counter = [0]*n
for _ in range(n-1):
    a, b = map(int, input().split())
    edge[a-1].append(b-1)
    edge[b-1].append(a-1)
for _ in range(q):
    a, b = map(int, input().split())
    counter[a-1] += b
def dfs(start, prev=-1):
    for i in edge[start]:
        if i == prev: continue
        counter[i] += counter[start]
        dfs(i, start)
dfs(0)
print(*counter)

### FIXED CODE ###

from collections import deque
n, q = map(int, input().split())
g = [[] for _ in range(n)]
for _ in range(n-1):
    a, b = map(int, input().split())
    g[a-1].append(b-1)
    g[b-1].append(a-1)
count = [0]*n
for i in range(q):
    p, x = map(int, input().split())
    count[p-1] += x
q = deque([0])
d = [0]*n
while q:
    v = q.popleft()
    d[v] = 1
    for i in g[v]:
        if d[i]:
            continue
        count[i] += count[v]
        q.append(i)
print(*count)
n, k = map(int, input().split())
p = map(int, input().split())

p_e = [0] + [ (x + 1) * 0.5 for x in p]
p_p = [0]

for i in range(1, n+1):
    p_p.append(p_p[i-1] + p_e[i])

e_sum = [p_p[i] - p_p[i - k] for i in range(k+1, n+1)]
print(max(e_sum))

### FIXED CODE ###

n, k = map(int, input().split())
p = map(int, input().split())

p_e = [0] + [ (x + 1) * 0.5 for x in p]
p_p = [0]

for i in range(1, n+1):
    p_p.append(p_p[i-1] + p_e[i])

e_sum = [p_p[i] - p_p[i - k] for i in range(k, n+1)]
print(max(e_sum))
n, m = (int(i) for i in input().split())
a = [int(input()) for i in range(m)]
MOD = 10**9 + 7

d = [0] * (n+1)
d[1] = (1 if len(a) == 0 or a[0] != 1 else 0)
d[2] = (d[1] + 1 if len(a) == 0 or 2 not in a else 0)

for i in range(2,n):
    d[i+1] = (d[i] + d[i-1])%MOD
    if i+1 in a:
        d[i+1] = 0
print(d[n]%MOD)

### FIXED CODE ###

n, m = (int(i) for i in input().split())
a = {int(input()) for i in range(m)}
MOD = 10**9 + 7

d = [0] * (n+5)
d[1] = (0 if 1 in a else 1)
d[2] = (0 if 2 in a else d[1] + 1)

for i in range(2,n):
    d[i+1] = (d[i] + d[i-1])%MOD
    if i+1 in a:
        d[i+1] = 0
print(d[n]%MOD)
import sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N,W = LI()
wv = [LI() for _ in range(N)]
V = N*10**3
dp = [[float('INF')]*(V+1) for _ in range(N+1)]
dp[0][0] = 0
for i in range(1,N+1):
    w,v = wv[i-1]
        for j in range(V+1)):
        if j-v>=0 and dp[i-1][j-v]+w<=W:
            dp[i][j] = min(dp[i][j],dp[i-1][j-v]+w)
        dp[i][j] = min(dp[i][j],dp[i-1][j])
print(max([i for i in range(V+1) if dp[-1][i]<=W]))

### FIXED CODE ###

import itertools,sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N,W = LI()
wv = [LI() for _ in range(N)]
V = N*10**3
dp = [[float('INF')]*(V+1) for _ in range(N+1)]
dp[0][0] = 0
for i,j in itertools.product(range(1,N+1),range(V+1)):
    w,v = wv[i-1]
    if j-v>=0:
        dp[i][j] = min(dp[i][j],dp[i-1][j-v]+w)
    dp[i][j] = min(dp[i][j],dp[i-1][j])
print(max([i for i in range(V+1) if dp[-1][i]<=W]))
a=input("")
b='Sunny'
c='Cloudy'
d='Rainy'
if a=b:
 print(c)
elif a=c:
 print(d)
else:
 print(b)


### FIXED CODE ###

a = input()
b = 'Sunny'
c = 'Cloudy'
d = 'Rainy'
if a == b:
 print(c)
if a == c:
 print(d)
if a == d:
 print(b)
n,m,l = map(int,input().split())
a = []
b = []
for _ in range(n):
    a.append(list(map(int,input().split())))
for _ in range(m):
    b.append(list(map(int,input().split())))
c = [[0 for _ in range(n)] for _ in range(l)]

for i in range(n):
    for j in range(m):
        for k in range(l):
            c[i][k] += a[i][j]*b[j][k]

for i in c:
    print(" ".join(list(map(str,i))))

### FIXED CODE ###

n,m,l = map(int,input().split())
a = []
b = []
for _ in range(n):
    a.append(list(map(int,input().split())))
for _ in range(m):
    b.append(list(map(int,input().split())))
c = [[0 for _ in range(l)] for _ in range(n)]

for i in range(n):
    for j in range(m):
        for k in range(l):
            c[i][k] += a[i][j]*b[j][k]

for i in c:
    print(" ".join(list(map(str,i))))
N,K=(int(x) for x in input().split())
H=list(map(int, input().split()))
A = sorted(H, reverse=True)
i=0

if K >= N:
    print('0')
else:
    
    for i in range(K):
        A.pop(i)
        i=i+1
    B=sum(A)
    print(B)

### FIXED CODE ###

N,K=(int(x) for x in input().split())
H=list(map(int, input().split()))
A = sorted(H)
i=0
a=N-K
if K >= N:
    print('0')

else:
    B=A[:a]
    C=sum(B)
    print(C)
length0 = input()
length = length0.split()
a = length[0]
b = length[1]
area = a*b
per = 2*a+2*b
print(area," ",per)


### FIXED CODE ###

length0 = input()
#print(length0)
length = length0.split()
a = int(length[0])
b = int(length[1])
#print(str(a)+" "+str(b))
area = a*b
per = 2*a+2*b
print(str(area)+" "+str(per))
n=int(input())
a=list(map(int,input().split()))

mod=10**9+7
total = sum(a)
cum=[]

ans=0
for i in range(n):
    total-=a[i]
    ans += a[i]*(total)%mod
    

print(ans)


### FIXED CODE ###

D,T,S = map(int,input().split())

if D/S <= T:
    print('Yes')
else:
    print('No')
a, b = map(int, input().split())
c = a+b
print(c//2 if c%2==0)


### FIXED CODE ###

a, b = map(int, input().split())
c = a + b
if c % 2 == 0:
  print(c//2)
else:
  print("IMPOSSIBLE")
S = str(input())
ans = []
for i in range(len(S)):
    for k in range(i,len(S)):
        if all("ACGT".count(c)==1 for c in S[i:k+1]):
            ans.append(len(S[i:k+1]))
print(max(ans))

### FIXED CODE ###

S = str(input())
ans = [0]
for i in range(len(S)):
    for k in range(i,len(S)):
        if all("ACGT".count(c)==1 for c in S[i:k+1]):
            ans.append(len(S[i:k+1]))
print(max(ans))
def main2():
    n = int(input())
    x = int(math.ceil(n / 1.08))
    
    if int(x*1.08) == n:
        print(x)
    else:
        print(":(")

if __name__ == "__main__":
    main2()

### FIXED CODE ###

def main():
    n = int(input())

    x = int(n/1.08)
    if int(x * 1.08) == n:
        print(x)
    elif int((x + 1) * 1.08) == n:
        print(x + 1)
    elif int((x - 1) * 1.08) == n:
        print(x - 1)
    else:
        print(":(")

if __name__ == "__main__":
    main()
h,w=map(int,input().split())
S=[]
for i in range(h):
    s=list(map(int,input.split())
    S.append(s)
for i in range(h):
    for j in range(w):
        if S[i+1][j]==S[i][j+1]==S[i-1][j]==S[i][j-1]==".":
            print("No")
            quit()
print("Yes")

### FIXED CODE ###

h,w=map(int,input().split())
S=[]
for i in range(h):
    s=input()
    S.append(s)
for i in range(1,h-1):
    for j in range(1,w-1):
        if S[i+1][j]==S[i][j+1]==S[i-1][j]==S[i][j-1]=="." and S[i][j]=="#":
            print("No")
            quit()
print("Yes")
a, b, n = map(int, input().split())
print(b // x - (a - 1) // x)

### FIXED CODE ###

a, b, x = map(int, input().split())
print(b // x - (a - 1) // x)
n=int(input())
m=map(int,input().split())
a=[0 for i in range(100000)]
x=0
y=0
for i in m:
    a[i]+=1
for i in range(len(a)):
    if a[i]>=2:
        x=y
        y=i

ans=x*y
print(ans)


### FIXED CODE ###

n=int(input())
a=map(int,input().split())
a=sorted(a)
a=list(reversed(a))
h,w=0,0
tmp=0
f=0
for x in a:
    if tmp==x:
        if w!=0:
            h=x
            break
        else:
            w=x
            tmp=0
            continue
    tmp=x
print(w*h)
import numpy as np
inp = input()
ACGT = ["", "A", "C", "G", "T"]
sentences = [j+K+m+n for j in ACGT for k in ACGT for m in ACGT for n in ACGT]
length = [len(sent) for sent in sentences if sent in inp]
print(np.max(length))

### FIXED CODE ###

inp = input()
res = 0
for i in range(len(inp)+1):
  for j in range(i+1, len(inp)+1):
    if len([w for w in inp[i:j] if w in ["A", "C", "G", "T"]]) == (j-i):
      res = max(res, j-i)
print(res)
N = int(input())
K = int(input())
x = list(map(int,input().split()))
length = 0
Khalf = K//2
for i in range(N):
	if x[i] <= Khalf:
		length += 2*x[i]
	else:
		length += 2*(K-x[i])
print(length)



### FIXED CODE ###

N = int(input())
A = int(input())
print(N**2-A)
N, K = map(int, input().split())
ar = list(map, input().split())

count = 0
for i in range(N):
    if ar[i] >= K:
        count += 1

print(count)


### FIXED CODE ###

N, K = map(int, input().split())
ar = list(map(int, input().split()))

count = 0
for i in range(N):
    if ar[i] >= K:
        count += 1

print(count)
print(-int(input()%1000)

### FIXED CODE ###

import math
n = int(input())
if n % 1000 == 0:
  print(0)
else:
  print(math.ceil(n / 1000) * 1000 - n)
# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())
h_list = input().split()
h_list = [int(h) for h in h_list]

count = 0

for i in range(n):
    a_height = h_list[i]
    if i + 21 < n:
        n_aa = i + 21
    else:
        n_aa = n
    for k in range(i + 1 + a_height, n_aa):
        b_height = h_list[k]
        if k - i == a_height + b_height:
            count += 1

print(count)


### FIXED CODE ###

# -*- coding: utf-8 -*-
n, a, b, c = map(int, input().split())

value_dict = {'A': a, 'B': b, 'C': c}
result_list = []
input_list = []
flag = True

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

for next, input in enumerate(input_list, 1):
    if value_dict[input[0]] < value_dict[input[1]]:
        value_dict[input[0]] += 1
        value_dict[input[1]] -= 1
        result_list.append(input[0])
    elif value_dict[input[1]] < value_dict[input[0]]:
        value_dict[input[1]] += 1
        value_dict[input[0]] -= 1
        result_list.append(input[1])
    else:
        if value_dict[input[0]] == 0:
            flag = False
            break
        elif next == len(input_list):
            result_list.append(input[0])
        elif input[0] in input_list[next]:
            value_dict[input[0]] += 1
            value_dict[input[1]] -= 1
            result_list.append(input[0])
        else:
            value_dict[input[1]] += 1
            value_dict[input[0]] -= 1
            result_list.append(input[1])

if flag:
    print('Yes')
    for result in result_list:
        print(result)

else:
    print('No')