Harryxun/stf_run huggingface dataset:
import numpy as np

n, d = map(int,input().split())

listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
        #または、quit(),os.exit()をして止める。

count = 0
for i in range(n):
    for j in range(n):
        if(i < j):
            dis = 0
            for k in range(d):
                dis += (listA[i][k]-listA[j][k]) ** 2
            dis = np.sqrt(dis)
            if(dis.is_integer()):
                count += 1


print(count)


### FIXED CODE ###

import numpy as np

n, d = map(int,input().split())

listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
        #または、quit(),os.exit()をして止める。

count = 0
for i in range(n):
    for j in range(n):
        if(i < j):
            dis = 0
            for k in range(d):
                dis += (listA[i][k]-listA[j][k]) ** 2
            dis = np.sqrt(dis)
            #if(dis.is_integer()):
            if( dis/int(dis) == 1 ):
                count += 1


print(count)
s = 0
for i in map(int, input().split()):
    if i == 1:
        s+=300000
    elif i ==2 :
        s+= 200000
    elif i ==3 :
        s+= 100000
if s== 600000:
    s = 1000000
print(s)

### FIXED CODE ###

s = 0
for i in map(int, input().split()):
    if i == 1:
        s+=300000
    elif i ==2 :
        s+= 200000
    elif i ==3 :
        s+= 100000
if s== 600000:
    s = 1000000
print(s)
n,m=map(int,input().split())
h_list=list(map(int,input().split))
col_list=[[0]*n for _ in range(n)]
count=0
for _ in range(m):
  a,b=map(int,input().split)
  col_list[a-1][b-1]+=1

for i in range(n):
  for j in range(n):
    if col_list[i][j]>=1 and h_list[i]<=h_list[j]:
      count+=1
      break
print(n-count)


### FIXED CODE ###

n,m=map(int,input().split())
h_list=list(map(int,input().split()))
lst=[0]*n
for _ in range(m):
  a,b=map(int,input().split())
  if h_list[a-1]<=h_list[b-1]:
    lst[a-1]-=1
  if h_list[a-1]>=h_list[b-1]:
    lst[b-1]-=1
print(lst.count(0))
import numpy as np
N=int(input())
alist=list(map(int, input().split()))

alist.sort()
#print(alist)
ans=0
for i in range(1,N):
    a=alist[i]
    aaa=[a]*i
    x=np.array(aaa)
    y=np.array(alist[0:i])
    amari=x%y
    if list(amari).count(0)==1:
        ans+=1
print(ans)


### FIXED CODE ###

xlist=list(map(int, input().split()))
i=xlist.index(0)
print(i+1)
N=int(input())
A=list(map(int,input().split()))
print(*A[::-2],*A[N%2::2])

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
if n % 2 == 0:
    a = a[::-2]+a[0::2]
else: a = a[::-2] +a[1::2]
print(*a,sep=" ")
n = int(input())
an = input()
an = an.split()

dif = 10000000000

for i in range(n-1):
    for r in range(i+1, n):
        a = int(an[i])
        b = int(an[r])

        abs = abs(a-b)
        if abs < dif:
            dif = abs

print(dif)


### FIXED CODE ###

n = input()
an = input()
an = an.split()
list = []

for i in an:
    i = int(i)
    list.append(i)
min_an = min(list)
max_an = max(list)

print(max_an - min_an)
import sys

data=sys.stdin.readline()
print(data*data*data)


### FIXED CODE ###

import sys

data=int(input())
print(data*data*data)
import numpy as np
N, M = map(int, input().split())
AB_list = np.zeros((N, 2))

for i in range(N):
    A, B = map(int, input().split())
    AB_list[i] = [A, B]

if N==1:
    print(int(M*AB_list[0, 0]))
else:
    AB_list = AB_list[np.argsort(AB_list[:, 0])]
    i = 0
    money = 0
    while(AB_list[i, 1] <= M):
        money += AB_list[i,0] * AB_list[i, 1]
        M -= AB_list[i, 1]
        i += 1

    money += AB_list[i, 0] * M
    print(int(money))


### FIXED CODE ###

import numpy as np
N, M = map(int, input().split())
AB_list = np.zeros((N, 2))

for i in range(N):
    A, B = map(int, input().split())
    AB_list[i] = [A, B]

if N==1:
    print(int(M*AB_list[0, 0]))

elif np.sum(AB_list[:, 1]) == M:
    tmpsum = 0
    for i in range(N):
        tmpsum += AB_list[i, 0] * AB_list[i, 1]
    print(int(tmpsum))

else:
    AB_list = AB_list[np.argsort(AB_list[:, 0])]
    i = 0
    money = 0
    while(AB_list[i, 1] <= M):
        money += AB_list[i,0] * AB_list[i, 1]
        M -= AB_list[i, 1]
        i += 1

    money += AB_list[i, 0] * M
    print(int(money))
X, Y = map(int, input().split())
ans = 'No'
for a in range(X + 1):
	b = X - a
    if 2 * a + 4 * b == Y:
		ans = 'Yes'
print(ans)

### FIXED CODE ###

X, Y = map(int, input().split())
ans = 'No'
for a in range(X + 1):
    b = X - a
    if 2 * a + 4 * b == Y:
        ans = 'Yes'
print(ans)
N = int(input())
x = list(input())[::-1]
num = 0
nump = 0
numm = 0
pop_num = 0
for i in range(N):
    if x[i] == "1":
        pop_num += 1
for i in range(N):
    if x[i] == "1":
        num += pow(2,i,pop_num)
        num %= pop_num 
        nump += pow(2,i,pop_num+1)
        nump %= pop_num  + 1
        numm += pow(2,i,pop_num - 1)
        numm %= pop_num - 1



def popcnt(n):
    c = (n & 0x5555555555555555) + ((n>>1) & 0x5555555555555555)
    c = (c & 0x3333333333333333) + ((c>>2) & 0x3333333333333333)
    c = (c & 0x0f0f0f0f0f0f0f0f) + ((c>>4) & 0x0f0f0f0f0f0f0f0f)
    c = (c & 0x00ff00ff00ff00ff) + ((c>>8) & 0x00ff00ff00ff00ff)
    c = (c & 0x0000ffff0000ffff) + ((c>>16) & 0x0000ffff0000ffff)
    c = (c & 0x00000000ffffffff) + ((c>>32) & 0x00000000ffffffff)
    return c

x = x[::-1]
def calc(i,depth,n):
    if depth == 0:
        try: 
            if x[i] != "hoge":
                exit()
        except:
            while True:
                print("d")
        if x[i] == "1":
            tmp = numm
            tmp -= pow(2,N-i-1,pop_num-1)
            tmp %= (pop_num - 1)
            return calc(i,depth+1,tmp)
        else:
            tmp = nump
            tmp += pow(2,N-i-1,pop_num+1)
            tmp %= (pop_num + 1)
            return calc(i,depth+1,tmp)
    else:
        if n == 0: return depth
        return calc(i,depth+1, n % popcnt(n))
        

for i in range(N):
    print(calc(i,0,0))



### FIXED CODE ###

N = int(input())
x = list(input())[::-1]
num = 0
nump = 0
numm = 0
pop_num = 0
for i in range(N):
        if x[i] == "1":
            pop_num += 1
for i in range(N):
    if x[i] == "1":
        num += pow(2,i,pop_num)
        num %= pop_num 
        nump += pow(2,i,pop_num+1)
        nump %= pop_num  + 1
        if pop_num-1 != 0:
            numm += pow(2,i,pop_num - 1)
            numm %= pop_num - 1



def popcnt(n):
    c = (n & 0x5555555555555555) + ((n>>1) & 0x5555555555555555)
    c = (c & 0x3333333333333333) + ((c>>2) & 0x3333333333333333)
    c = (c & 0x0f0f0f0f0f0f0f0f) + ((c>>4) & 0x0f0f0f0f0f0f0f0f)
    c = (c & 0x00ff00ff00ff00ff) + ((c>>8) & 0x00ff00ff00ff00ff)
    c = (c & 0x0000ffff0000ffff) + ((c>>16) & 0x0000ffff0000ffff)
    c = (c & 0x00000000ffffffff) + ((c>>32) & 0x00000000ffffffff)
    return c

x = x[::-1]
def calc(i,depth,n):
    if depth == 0:
        if x[i] == "1":
            tmp = numm
            if pop_num - 1 != 0:
                tmp -= pow(2,N-i-1,pop_num-1)
                tmp %= (pop_num - 1)
            else:
                return 0
            return calc(i,depth+1,tmp)
        else:
            tmp = nump
            tmp += pow(2,N-i-1,pop_num+1)
            tmp %= (pop_num + 1)
            return calc(i,depth+1,tmp)
    else:
        if n == 0: return depth
        return calc(i,depth+1, n % popcnt(n))
        

for i in range(N):
    print(calc(i,0,0))
n,x = list(map(int,input().split()))

l = [int(s) for s in input().split()]
d = 0
i = 1
d = [0] * (n+1)
count = 0

while True:
    
    
    d[i] = d[i-1] + l[i-1]
    count += 1
    
    if d[i] > x:
        break
    i += 1

print(count)


### FIXED CODE ###

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

l = [int(s) for s in input().split()]
d = 0
i = 1
d = [0] * (n+1)
count = 0
if n == 1 and x >= l[0]:
    print(1)
elif n == 1 and x < l[0] :
    print(0)
else:

    while True:
        
        
        d[i] = d[i-1] + l[i-1]
        count += 1
        
        if d[i] > x:
            break
        
        i += 1
        if i > n:
            print(count+1)
            exit()

    print(count)
from sys import stdin
import sys
import math
import random
from decimal import Decimal


N, M, K = [int(x) for x in stdin.readline().rstrip().split()]
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A.append(10**10)
B.append(10**10)
c1 = 0
c2 = 0
flag = 0
while True:
    if K < A[c1] and K < B[c2]:
        break
    if A[c1] < B[c2]:
        K = K-A[c1]
        c1 += 1
    elif A[c1] > B[c2]:
        K = K-B[c2]
        c2 += 1
    else:
        t1 = c1+1
        t2 = c2+1
        while True:
            if A[t1] < B[t2]:
                K = K-A[c1]
                c1 += 1
                break
            elif A[t1] > B[t2]:
                K = K-B[c2]
                c2 += 1
                break
            else:
                t1 = t1+1
                t2 = t2+1
print(c1+c2)


### FIXED CODE ###

from sys import stdin
import sys
import math
import random
from decimal import Decimal


N, M, K = [int(x) for x in stdin.readline().rstrip().split()]
A = list(map(int, input().split()))
A1 = [0]
for i, v in enumerate(A):
    x = A1[i]+v
    A1.append(x)
B = list(map(int, input().split()))
B1 = [0]
for i, v in enumerate(B):
    x = B1[i]+v
    B1.append(x)
c1 = 0
c2 = 0
ans = 0
temp = M

for i in range(N+1):
    if A1[i] > K:
        break
    while B1[temp] > K-A1[i]:
        temp -= 1
    ans = max(ans, i+temp)
    # for k in range(temp, 0, -1):
    #     if A1[i]+B1[k] <= K:
    #         ans = max(ans, i+k)
    #         temp = k
    #         break
# print(c1, c2)

print(ans)
n = int(input())
a = [int(input()) for _ in range(n)]
tmp = a[0]
if a.index(2) == -1:
    print(-1)
else:
    ans = -1
    count = 0
    while(tmp != 1):
        count += 1
        if tmp == 2:
            ans = count
            break
        tmp = a[tmp - 1]
print(ans)

### FIXED CODE ###

n = int(input())
a = [int(input()) for _ in range(n)]
tmp = a[0]
ans = -1
count = 0
for i in range(n):
    count += 1
    if tmp == 2:
        ans = count
        break
    tmp = a[tmp - 1]
print(ans)
p=print
r=range
c=0
def a(i,j,k,l=0):
	global c
    p("+<"[l],i,j,k)
	c = c + 1
def b(i):a(i,i,i+1)
def d(x,i):
	a(x,3,x)
	for t in r(i,i+30):
		b(p:=t+1)
		a(q:=p+1,3,q)
		[*map(b,r(q,v:=i+31))]
		a(v,x,t,1)
		b(p)
		a(q,t,q)
p(3934)
a(0,1,3)
a(2,3,3,1)
d(0,9)
d(1,50)
for t in r(60):a(2,2,2);[t-31<s<30!=(a(8+t-s,50+s,5),a(3,5,6,1),a(2,6,2))for s in r(t)]

### FIXED CODE ###

n=97
r=range
L='<'
P='+'
l=[3933,P,0,1,n,L,2,n,n,P,0,n,3,P,1,n,4]
a=lambda i,j:[P,i,j,i]
b=lambda i:[P,i,i,i+1]
def d(x,i,j):
	return sum([sum([b(j+t-1),a(j+t,n),*(b(s)for s in r(j+t,j+29)),[L,j+29,x,i+t],b(j+t-1),a(j+t,i+t)],[])for t in r(30)],[])
l+=d(3,5,36)
l+=d(4,36,67)
for t in r(59):
	l+=a(2,2)
	for s in r(t+1):
		if t-30<s<30:l+=[P,5+t-s,36+s,98];l+=[L,n,98,99];l+=a(2,99)
print(*l)
D, G = (int(i) for i in input().split())  
PC = [[int(i) for i in input().split()] for i in range(D)] 

max_atmpt = G // (D * 100)
total = 0
ans = 0
count = 0
pc_gain_sorted = []
idx_list = []
for i, (p, c) in enumerate(PC):
  pc_gain_sorted.append((p * (i + 1) * 100 + c, i + 1, p))
pc_gain_sorted.reverse()

for gain, idx, _ in pc_gain_sorted:
  if total + gain <= G:
    total += gain
    idx_list.append(idx) # start from 1
    count += PC[idx - 1][0]
    
for gain, idx, p in pc_gain_sorted:
  if idx not in idx_list:
    break

for i in range(10):
  tmp = []
  for j, (p, c) in enumerate(PC):
    if i + 1 
  	tmp.append((j + 1) * 100 * (i + 1)
  

print(ans + count)

### FIXED CODE ###

D, G = (int(i) for i in input().split())  
PC = [[int(i) for i in input().split()] for i in range(D)] 

s = 0
Q = []
for i, (p, c) in enumerate(PC):
    s += p
    Q.append((i+1, p, c))
    
dp = [-10**18]*(s+1)
dp[0] = 0

for i, p, c in Q:
  for j in range(s, -1, -1): # 解きうる問題総数をイテレート
    for k in range(1, p+1): # 解く問題数をイテレート
      if k == p:
        cc = 100*i*k + c
      else:
        cc = 100*i*k
      if j - k >= 0:
        dp[j] = max(dp[j], dp[j - k] + cc)

for i, total in enumerate(dp):
  if total >= G:
    print(i)
    break
N = int(input())
inp = [int (x) for x in input().split(" ")]

refs = [0 for _ in range(N)]
k = len(inp) - 1
rev = True
for i in range(N):
    refs[i] = k
    if k == 1 and rev:
        k = -2
        rev = False
    if k == 0 and rev:
        k = -1
        rev = False
    k = k - 2 if rev else k + 2

#print(" ".join([str(x) for x in refs]))


for i in range(N):
    refs[i] = inp[refs[i]]

print(" ".join([str(x) for x in refs]))


### FIXED CODE ###

x = [int(i) for i in input().split(" ")]
x.sort()
print(x[0] + x[1])
while 1:
            x=sum(map(int,list(input())))
            if x==0:break
            print(x)

### FIXED CODE ###

for x in iter(input,'0'):print(sum(map(int,x)))
import sys
import math
#a = []
#for l in sys.stdin:
#    a.append(int(l))
a = int(input())
b = int(input())
h = int(input())
m = int(input())

kak1 = 0 if h == 0 else h * 30
kak2 = 0 if m == 0 else m * 6
#print(kak1,kak2)

kaku = kak1 -kak2
result = a * a + b * b - 2 * a * b * math.cos(kaku * math.pi / 180)
print(math.pow(result,0.5))

### FIXED CODE ###

import sys
import math

a,b,h,m= map(int,input().split())

kak1 = float(h * 30 + m * 0.5)
kak2 = m * 6

kaku = kak1 -kak2 if kak1 < kak2 else kak2 - kak1
result = a * a + b * b - 2 * a * b * math.cos(kaku * math.pi / 180)
print(math.sqrt(result))
n=int(input())
ac=0
wa=0
tle=0
re=0

for i in range(n):
  num=str(input())
  if num=="AC":
    ac+=1
  elif num=="WA":
    wa+=1
  elif num=="TLE":
    tle+=1
  else num=="RE":
    re+=1
    
print("AC × {}".format(ac))
print("WA × {}".format(wa))
print("TLE × {}".format(tle))
print("RE × {}".format(re))


### FIXED CODE ###

n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  num=str(input())
  if num=="AC":
    ac+=1
  elif num=="WA":
    wa+=1
  elif num=="TLE":
    tle+=1
  else:
    re+=1
    
print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))
n = int(raw_input())
 maxv = -10**9
 minv = 10**9

 for j in range(n-1):
   nums = int(raw_input())
   diff = nums - minv
   maxv = max(maxv,diff)
   minv = min(minv,nums)
 print maxv

### FIXED CODE ###

n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9
  
for j in range(n-1):
  nums = int(raw_input())  
  diff = nums - minv
  if maxv < diff:
    maxv = diff
  if nums < minv:
    minv = nums
  
print maxv
A, B= map(int, input().split())
C = int(input())

A_B = A*B % 2

if A_B == 0:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

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

A_B = (A*B) % 2

if A_B == 0:
    print("No")
else:
    print("Yes")
import math
n=int(input())
l=[input() for i in range(5)]
print(math.ceil(n/min(l))+4)

### FIXED CODE ###

import math
n=int(input())
l=[int(input()) for i in range(5)]
print(math.ceil(n/min(l))+4)
n,x = map(int,input().split())
a = list(map(int,input().split()))
res,ans = [],0
for i in range(n):
	res.append(abs(a[i]-x))
#print(min(res))
res.sort()
bol = False
s = 0
while(bol==False):
	tmp = res[s]
	cnt = 0
	for j in range(n-1):
		if a[j]%tmp == a[j+1]%tmp:
			cnt += 1
	if cnt == n-1:
		bol = True
		ans = tmp
	else:
		s += 1
print(ans)

### FIXED CODE ###

import fractions
n,x = map(int,input().split())
a = list(map(int,input().split()))
res,ans = [],0
for i in range(n):
	res.append(abs(a[i]-x))
if len(res) > 3:
	D = fractions.gcd(res[0],res[1])
	for j in range(2,len(res)-2):
		D = fractions.gcd(D,res[j])
	ans = D
else:
	ans = min(res)
print(ans)
n,s = [input() for i in range(2)]
c = 0
for i in range(1000):
    if i < 10:
        a1 = '0'
        a2 = '0'
        a3 = i
    elif i < 100:
        a1 = '0'
        a2 = str(i)[0]
        a3 = str(i)[1]
    else:
        a1 = str(i)[0]
        a2 = str(i)[1]
        a3 = str(i)[2]
    p1 = s.find(a1)
    if p1 >= 0:
        p2 = s.find(a2, p1 + 1)
        if p2 >= 0:
            if s.find(a3, p2 + 1) >= 0:
                c += 1
print(c)

### FIXED CODE ###

n,s = [input() for i in range(2)]
c = 0
for i in range(1000):
    if i < 10:
        a1 = '0'
        a2 = '0'
        a3 = str(i)
    elif i < 100:
        a1 = '0'
        a2 = str(i)[0]
        a3 = str(i)[1]
    else:
        a1 = str(i)[0]
        a2 = str(i)[1]
        a3 = str(i)[2]
    p1 = s.find(a1)
    if p1 >= 0:
        p2 = s.find(a2, p1 + 1)
        if p2 >= 0:
            if s.find(a3, p2 + 1) >= 0:
                c += 1
print(c)
x = list(map(int, input().split()))  # n個の数字がリストに格納される

for i in range(x):
  if x[i] is 0:
    print(i+1)

### FIXED CODE ###

x = list(map(int, input().split()))  # n個の数字がリストに格納される

for i in range(5):
  if x[i] is 0:
    print(i+1)
def gcd(a, b):
    if(a == 0):
        return b
    return gcd(b % a, a)
def lcm(a, b):
    return (a / gcd(a, b)) * b 
t = int(input())
ans = 1
while(t != 0):
    t -= 1
    n = int(input())
    ans = lcm(ans, n)
print(int(ans))


### FIXED CODE ###


def computeGCD(x, y): 
   while(y):
   		x, y = y, x % y
   return x 
n=int(raw_input())
ar=[]
for i in range(0,n):
	k=int(raw_input())
	ar.append(k)

an=ar[0]
for x in range(1,n):
	an=(an*ar[x])/computeGCD(an,ar[x]);
print(an)
import math
import functools

def lcm(a,b):
    return  int(a*b/math.gcd(a,b))
    
N=int(input())
t=[int(input()) for i in range(N)]

print(functools.reduce(lcm,t))

### FIXED CODE ###

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

def lcm(a,b):
    return  a*b//gcd(a,b)
    
n=int(input())
t=[int(input()) for i in range(n)]

anser=1
for i in t:
    anser=lcm(anser,i)
print(anser)
N=int(input())
A=sorted(list(map(int,input().split())))
A=[i//400 for i in A]

Colors=[0,0,0,0,0,0,0,0,0]
for i in A:
    Colors[i]+=1

Count=0
for i in range(8):
    if Colors[i]>0:
        Count+=1
if Count==0:
    Count=1

print(Count,Count+Colors[-1])

### FIXED CODE ###

N=int(input())
A=sorted(list(map(int,input().split())))
A=[i//400 for i in A]

Colors=[0,0,0,0,0,0,0,0,0]
for i in A:
    if i>=8:
        Colors[8]+=1
    else:
        Colors[i]+=1

Count=0
for i in range(8):
    if Colors[i]>0:
        Count+=1

print(max(Count,1),Count+Colors[-1])
a,b = int(input())
ab = a*b

if ab%2 == 0:
    print('Even')
else:
    print('Odd')

### FIXED CODE ###

a,b = map(int,input().split())
ab = a*b

if ab%2 == 0:
    print('Even')
else:
    print('Odd')
n = int(input())
h_list = map(int, input().split())
highest = max(h_list)
count = 1

for i in range(1, n):
    if highest <= h_list[i]:
        count += 1

print(count)


### FIXED CODE ###

n = int(input())
h_list = list(map(int, input().split()))
highest = 0
count = 0

for i in range(n):
    if highest <= h_list[i]:
        count += 1
        highest = h_list[i]

print(count)
n = int(input())
a = list(map(int, input().split()))
cnt = [0] * (10**6)

for elem in a:
    if elem not in cnt:
        cnt[elem] += 1

unique = []

for i in range((10**6)+1):
    if cnt[i] == 1:
        unique.append(i)

cnt = [0] * ((10**6)+1)

for elem in unique:
    for m in range(elem*2, (10**6)+1, elem):
        cnt[m] = 1

ans = 0

a = list(set(a))

for elem in a:
    if cnt[elem] == 0:
        ans+=1

print(ans)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
cnt = [0] * ((10**6)+1)

for elem in a:
    cnt[elem] += 1

unique = []

for i in range((10**6)+1):
    if cnt[i] == 1:
        unique.append(i)

cnt = [0] * ((10**6)+1)

a = list(set(a))

for elem in a:
    for m in range(elem*2, (10**6)+1, elem):
        cnt[m] = 1

ans = 0

for elem in unique:
    if cnt[elem] == 0:
        ans+=1

print(ans)
from sys import stdin

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

print((input[0]+input[1])*input[3]/2)

### FIXED CODE ###

a = int(input())
b = int(input())
h = int(input())

area = (a+b)*h/2
print(int(area))
import collections
n=int(input())
d=list(map(int,input().split()))
m=int(input())
t=list(map(int,input().split()))
dd,tt=collections.Counter(d),collections.Counter(t)
for k,v in tt.items():
  h=dd.get(k)>=v
  if h==False:
    print("NO")
    exit()
print("YES")

### FIXED CODE ###

import collections
n=int(input())
d=list(map(int,input().split()))
m=int(input())
t=list(map(int,input().split()))
dd,tt=collections.Counter(d),collections.Counter(t)
for k,v in tt.items():
  if dd.get(k)==None:
    print("NO")
    exit()
  elif dd.get(k)<v:
    print("NO")
    exit()
print("YES")
import numpy as np
n,m,x = map(int,input().split())
l = []
for i in range(n):
    l.append(np.array(input().split(),dtype=int)) 
import itertools
num = [i for i in range(n)]
min = 100000000000001
k = 1
while k <n+1:
    a = list(itertools.combinations(num, k))
    for i in range(len(a)):
        total =np.zeros(m+1,dtype=int)
        for j in range(len(a[i])):
            total +=l[a[i][j]]
        if np.sum(np.where(total < x)[0]) <=0:
            if min > total[0]:
                min = total[0]
                k = n+2
    k +=1
if min == 100000000000001:
  print(-1)
else:
  print(min)

### FIXED CODE ###

s = input()
t = input()
if t.find(s) == 0 and len(t)-len(s) == 1:
    print('Yes')
else:
    print('No')
from math import gcd
from functools import reduce

N, X = map(int, input().split())
x = list(map(int, input().split()))
x.append(X)
x.sort()
array = []
for i in range(N-1):
    array.append(x[i+1]-x[i])

if len(array) > 1:
    result = reduce(gcd, array)
else:
    result = array[0]
print(result)


### FIXED CODE ###

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

N, X = map(int, input().split())
x = list(map(int, input().split()))
x.append(X)
x.sort()
array = []
for i in range(N):
    array.append(x[i+1]-x[i])

if len(array) > 1:
    result = gcd(array[0], array[1])
    for i in range(2, len(array)):
        result = gcd(result, array[i])
else:
    result = array[0]
    
print(result)
a, b = input().split()

if (a + b) % 2 == 0:
    print((a + b) % 2)
else:
    print("IMPOSSIBLE")

### FIXED CODE ###

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

if(a < b):
  swap = b
  b = a
  a = swap

k = (a + b) // 2

if ((((a + b) % 2) == 0) and (a >= k) and (k >= b)) :
    print(k)
else:
    print("IMPOSSIBLE")
days=int(input())
k=int(input())
yen_until_k=int(input())
yen_after_k=int(input())
if days <= k:
  print(days*yen_until_k)
else:
  print(k*yen_until_k+(n-k)*yen_after_k)

### FIXED CODE ###

days=int(input())
k=int(input())
yen_until_k=int(input())
yen_after_k=int(input())
if days <= k:
  print(days*yen_until_k)
else:
  print(k*yen_until_k+(days-k)*yen_after_k)
N = int(input())
a = [list(map(int,input().split())) for i in range(2)]
s = 0; t = 0; u = 0; v = 0
for i in range(0,N):
    for j in range(0,i+1):
        s += a[0][j]
        t += a[1][j]
        u += a[0][N-j-1]
        v += a[1][N-j-1]
	if s>=t and v>=u:
        print(s+v)

### FIXED CODE ###

N = int(input())
a = [list(map(int,input().split())) for i in range(2)]
b = []
for i in range(0,N):
    s = 0
    v = 0
    for j in range(0,i+1):
        s += a[0][j]
    for j in range(i,N):
        v += a[1][j]
    b.append(s+v)
print(max(b))
n = int(input())
a = int(input())

if n < 500 :
  if a >= n[-3:] :
    print('Yes')
  else:
    print('No')
else:
  if a >= n[-2:] :
    print('Yes')
  else:
    print('No')

### FIXED CODE ###

n = int(input())
a = int(input())

b = n % 500
if b <= a:
  print('Yes')
else:
  print('No')
import sys

N = sys.stdin.readline().strip()
N = int(N)

M = math.ceil(N / 111.0)
M = int(M * 111)


print(M)

### FIXED CODE ###

import sys
import math
 
N = sys.stdin.readline().strip()
N = int(N)
 
M = math.ceil(N / 111.0)
M = int(M * 111)

print(M)
def selectionsort(a,n):
  counter = 0
  for i in range(n-1):
    idx = None
    mi = a[i]
    flag = False
    for x in reversed(range(i,n)):
      if mi > a[x]:
        idx = x
        mi = a[x]
        counter+=1
        flag = True
    if flag:
      a[i],a[idx] = a[idx],a[i]
    if counter > n - 2:
      return a, True
  return a, counter
 
len = int(input())
a = sorted([int(i) for i in input().split(" ")])
b = [int(i) for i in input().split(" ")]
b, counter = selectionsort(b,len)

Flag = True

if counter:
  print("No")


else:
  for i in range(len):
    if a[i] > b[i]:
      print("No")
      Flag = False
      break
      

  if Flag:
    print("Yes")

### FIXED CODE ###

i = int(input())

print((i-1)//2)