Harryxun/stf_run huggingface dataset:
X = int(input())
if X >= 2000:
    print(1)
else:
    c = 0
    for i in range(20):
        if X%100 <= i*5:
            c=1
        else:
            c=0
    

print(c)

### FIXED CODE ###

X = int(input())
if X >= 2000:
    print(1)
elif X<= 99:
    print(0)
else:
    c = 0
    for i in range(1,20):
        if int(X//100) == i:
            if X%100 <= i*5:
                c=1
    print(c)
N = int(input())
A_list = []
for i in range(N):
    A = int(input())
    A_list.append(A)
sort_A = sorted(A_list, reverse = True)
k = 0
while (1):
    if sort_A[k] != sort_A[k+1]:
        A_second = sort_A[k+1]
        break
    k += 1
for i in range(N):
    if A_list[i] == sort_A[0]:
        print(A_second)
    else:
        print(sort_A[0])

### FIXED CODE ###

N = int(input())
A_list = []
for i in range(N):
    A = int(input())
    A_list.append(A)
sort_A = sorted(A_list, reverse = True)
max_f = sort_A[0]
max_s = sort_A[1]
for i in range(N):
    print(max_s) if A_list[i] == max_f else print(max_f)
N,X = map(int,input().split())
L = list(map(int,input().split()))

count = 0
x = 0

for n in range(N+1):
  if x > X:
    print(count)
    break
  else:
    x += L[n]
    count += 1

### FIXED CODE ###

N,X = map(int,input().split())
L = list(map(int,input().split()))
 
count = 1
x = 0
 
for n in range(N):
  x += L[n]
  
  if x > X:
    break
  else:
    count += 1
    
print(count)
N, M, K = map(int, input().split())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]


ai = 0
bi = 0

dp = [0 for i in range(M+N+1)]

for i in range(1, N+M+1):
    if ai == N:
        res = b[bi]
        bi += 1
    elif bi == M:
        res = a[ai]
        ai += 1
    elif a[ai] == b[bi]:
        ra = ai; rb = bi
        while a[ra] == b[rb]:
            ra += 1
            rb += 1
            if a[ra] < b[rb]:
                res = a[ai]
                ai += 1
                break
            elif a[ra] > b[rb]:
                res = b[bi]
                bi += 1
                break
    elif a[ai] < b[bi]:
        res = a[ai]
        ai += 1
    else:
        res = b[bi]
        bi += 1
    dp[i] = dp[i-1] + res

#print(dp)

import bisect
print(bisect.bisect_right(dp, K)-1)

### FIXED CODE ###

import bisect

N, M, K = map(int, input().split())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]

da = [0 for _ in range(N+1)]
for i in range(N):
    da[i+1] = da[i] + a[i]
db = [0 for _ in range(M+1)]
for i in range(M):
    db[i+1] = db[i] + b[i]

ans = 0
for i in range(N+1):
    if da[i] > K:
        break
    ans = max(ans, i + bisect.bisect_right(db, K-da[i]) - 1)
print(ans)
import math

i, size = 0, 0
rs = []
while True:
    line = raw_input()
    if line == '0 0 0':
        for r in rs:
            if size <= r:
                print 'OK'
            else:
                print 'NA'
        break
    else:
        i += 1
    if i == 1:
        t = [int(n) for n in line.split()]
        t.sort()
        size = int(math.ceil(math.sqrt(t[0] * t[0] + t[1] * t[1])))
    if i > 2:
        rs.append(int(line))

### FIXED CODE ###

import math

results = []
while True:
    line = raw_input()
    if line == '0 0 0':
        for r in results:
            print r
        break
    else:
        t = [int(n) for n in line.split()]
        t.sort()
        size = math.sqrt(t[0] * t[0] + t[1] * t[1])
        entry = input()
        for i in range(entry):
            if float(2 * input()) > size:
                results.append('OK')
            else:
                results.append('NA')
#input
s = input()
t = input()

#output
m = len(s)
n = len(t)
dp = [[0]*(ls+1) for _ in range(lt+1)]

for i in range(m):
    for j in range(n):
        if s[i] == t[j]:
            dp[i+1][j+1] = dp[i][j]+1
        else:
            dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j])

ans = ""
while m > 0 and n > 0:
    if dp[m][n] == dp[m-1][n]:
        m -= 1
    elif dp[m][n] == dp[m][n-1]:
        n -= 1
    elif dp[m][n] == dp[m-1][n-1] + 1:
        ans += t[n-1]
        m -= 1
        n -= 1

print(ans[::-1])

### FIXED CODE ###

#input
s = input()
t = input()

#output
m = len(s)
n = len(t)
dp = [[0]*(m+1) for _ in range(n+1)]

for i in range(n):
    for j in range(m):
        if t[i] == s[j]:
            dp[i+1][j+1] = dp[i][j]+1
        else:
            dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j])

ans = ""
while m > 0 and n > 0:
    if dp[n][m] == dp[n-1][m]:
        n -= 1
    elif dp[n][m] == dp[n][m-1]:
        m -= 1
    elif dp[n][m] == dp[n-1][m-1] + 1:
        ans += t[n-1]
        n -= 1
        m -= 1

print(ans[::-1])
s = input()
if s = 'ABC':
  print('ARC')
else:
  print('ABC')

### FIXED CODE ###

s = input()
if s == 'ARC':
    print('ABC')
else:
    print('ARC')
N,M = map(int, input().split())
foods = [0]*M
for i in range(N):
    tmp = list(map(int, input().split()))
    for f in tmp[1:]:
        foods[f-1] += 1

cnt = 0
for i in range(1,N+1):
    if foods[i-1]==N:
        cnt += 1
print(cnt)


### FIXED CODE ###

N,M = map(int, input().split())
foods = [0]*M
for i in range(N):
    tmp = list(map(int, input().split()))
    for f in tmp[1:]:
        foods[f-1] += 1
cnt = 0
for i in range(1,M+1):
    if foods[i-1]==N:
        cnt += 1
print(cnt)
H, W  = map(int, input().split())
right = []
ans = []
for i in range(H):
    As = list(map(int, input().split()))
    for j in range(W-1):
        if As[j]%2 == 1:
            ans.append([i+1,j+1,i+1,j+1+1])
            As[j] -= 1
            As[j+1] += 1
    right.append(As[j])

for i in range(H-1):
    if right[i]%2 == 1:
        ans.append([i+1,j+1,i+1+1,j+1])
print(len(ans))
for a in ans:
    print(*a)


### FIXED CODE ###

### 予め一筆書きルートを作る
H, W = map(int,input().split())
As = []
for i in range(H):
    As.append(list(map(int,input().split())))
routes = []
for i in range(H):
    for j in range(W):
        if i%2 == 0:
            routes.append((i+1,j+1))
        else:
            routes.append((i+1,W-j))
n = len(routes)
mvs = []
cnt = 0
for i in range(n-1):
    hi,wi = routes[i]
    hi2,wi2 = routes[i+1]
    if As[hi-1][wi-1] % 2 == 1:
        As[hi2-1][wi2-1] += 1
        mvs.append([hi,wi,hi2,wi2])
        cnt += 1

print(cnt)
for h1,w1,h2,w2 in mvs:
    print(h1,w1,h2,w2)
n=int(input())
ans=0
total=0
for i in range(n+1):
  for j in range(201):
    if i%j==0:
      ans+=1
  if ans==8:
    total+=1
print(total)

### FIXED CODE ###

n=int(input())
total=0
for i in range(1,n+1,2):
  ans=0
  for j in range(1,i+1):
    if i%j==0:
      ans+=1
  if ans==8:
    total+=1
print(total)
count = 0
for _ in range(int(input())):
    n = int(input())
    count += 1 if mod(2, n-1, n) == 1 else 0
print(count)


### FIXED CODE ###

f=lambda x: 1 if x == 2 or x == 3 or (x>3 and x&1==1 and pow(2, x-1, x)==1) else 0
print(sum(f(int(input())) for _ in range(int(input()))))
N, M = map(int, input().split())
from collections import defaultdict
d = defaultdict(list)
l = [[] for i in range(M)]
for i in range(M):
    P,Y = map(str, input().split())
    P = "0" * (6-len(P)) + P
    d[P] += [int(Y)]
    l[i] = [P,int(Y)]
for i in range(M):
    tmp = str((sorted(d[l[i][0]]).index(l[i][1]))+1)
    print(l[i][0] + "0" * (6-len(tmp)) + tmp)

### FIXED CODE ###

A,B = map(int, input().split())
print(A + B//2)
import sys
f = sys.stdin


while True:
    n = int(f.readline())
    if n == 0:
        break
    k = [int(ki) for ki in f.readline().split()]
    k = [ki for ki in k if 0 < ki]
    print('NA' if max(k) < 2 else len(k) + 1)

### FIXED CODE ###

import sys
f = sys.stdin

while True:
    n = int(f.readline())
    if n == 0:
        break
    k = [int(ki) for ki in f.readline().split()]
    k = [ki for ki in k if 0 < ki]
    print('NA' if len(k) == 0 or max(k) < 2 else len(k) + 1)
import math

A,B=map(int,input())
print(A*B // math.gcd(A,B))


### FIXED CODE ###

import math
 
A,B=map(int,input().split())
print(A*B // math.gcd(A,B))
N = int(input())
A = list(map(int,input().split()))
x = 1
if A in 0:
    x = 0
else:
    for i in range(N):
        x *= A[i]
        if x > 10**18:
            x = -1
            break
print(x)


### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
x = 1
if 0 in A:
    x = 0
else:
    for i in range(N):
        x *= A[i]
        if x > 10**18:
            x = -1
            break
print(x)
N,M = map(int,raw_input().split())
node_list = [0 for l in range(N)]
for i in range(M):
    items = map(int,raw_input().split())
    node_list[items[0]-1]+=1
    node_list[items[1]-1]+=1
flag=False
for i in range(N):
    if node_list[i]%2==1:
        flag=True
        
if flag:
    print 'YES'
else:
    print 'NO'



### FIXED CODE ###

A,B,C = map(int,raw_input().split())

if A==B and B==C:
    if A%2==0 and B%2==0 and C%2==0:
        print -1
    else:
        print 0
else:
    for i in range(1000):
        if A%2==1 or B%2==1 or C%2==1:
            print i
            break
        newA = B/2 + C/2
        newB = C/2 + A/2
        newC = A/2 + B/2
        A = newA
        B = newB
        C = newC
a=list(input().split())
b=list(input().split())
c=list(input().split())
ans = a[0]+b[1]+c[2]
print(ans)

### FIXED CODE ###

a=list(input())
b=list(input())
c=list(input())
ans = a[0]+b[1]+c[2]
print(ans)
N,M=map(int,input().split())
a=[]
b=0 in range(N)
for i in range(M):
    a.append(int(input()))
j=M-1
if a[0]==1:
    f1=0
    f2=1
elif a[0]==2:
    f1=1
    f2=1
else:
    f1=1
    f2=2
def f(n,a,j):
    if n>2:
        if (n-1)!=a[j] and (n-2)!=a[j]:
            return f(n-1,a,j)+f(n-2,a,j)
        if j>0 and a[j]==a[j-1]+1:
            return 0
        if j+1<M and a[j+1]==a[j]+1:
            return 0
        elif (n-1)==a[j]:
            return f(n-2,a,j-1)
        elif (n-2)==a[j]:
            return f(n-1,a,j)
    elif n==1:
        return f1
    else:
        return f2
print(f(N,a,j))

### FIXED CODE ###

N,M=map(int,input().split())
a=[]
b=[0]*N
for i in range(M):
    a.append(int(input()))
if M==0:
    j=-1
else:
    j=0
if N==1:
    b[0]=1
elif M>0 and a[0]==1:
    b[0]=0
    b[1]=1
elif M>0 and a[0]==2:
    b[0]=1
    b[1]=1
else:
    b[0]=1
    b[1]=2
for i in range(N-2):
    if j==M-1 or (j>=0 and (i+2)!=a[j] and (i+1)!=a[j]):
        b[i+2]=b[i+1]+b[i]
    if j>0 and a[j]==a[j-1]+1:
        b[N-1]=0
    if j+1<M and a[j+1]==a[j]+1:
        b[N-1]=0
    elif j>=0 and (i+2)==a[j]:
        b[i+2]=b[i]
    elif j>=0 and j+1<M and (i+1)==a[j]:
        j+=1
        b[i+2]=b[i+1]
    elif j>=0 and (i+1)==a[j]:
        b[i+2]=b[i+1]
print(b[N-1]%1000000007)
a, b, c = input.split(",")
print(a,b,c)

### FIXED CODE ###

a,b,c = input().split(",")
print(a, b, c)
from functools import reduce
from operator import mul

n = int(input())
s = reduce(mul, map(int, input().split(' ')))
print('YES' if s == 175 else 'NO')


### FIXED CODE ###

from functools import reduce
from operator import mul

s = reduce(mul, map(int, input().split(' ')))
print('YES' if s == 175 else 'NO')
def main():
  # N個の県，M個の市，
  # 市iが誕生したのはY_i年で県P_iに属す
  # 市iが県P_iの中でx番目にできた市だと、市iの認識番号の上6桁はP_i,下6桁はx
  # 6桁以下だと6桁になるように左に0詰める

  N, M = map(int, input().split())
  # PY = []
  # for _ in range(M):
  #   a = list(map(int, input().split()))
  #   PY.append(a)
  PY = [list(map(int, input().split())) for _ in range(M)]
  PY_sorted = sorted(PY, key=lambda x: x[1])

  city_count = {}
  order = {}
  for i, (p, y) in enumerate(PY_sorted):
    if not p in city_count:
      city_count[p] = 0
    city_count[p] += 1
    order[p, i] = city_count[p]
    
  for i, (p, y) in enumerate(PY):
    print('{:06}{:06}'.format(p, order[p, i]))

main()

### FIXED CODE ###

N, M = map(int, input().split())
iPY = []
 
for i in range(M):
    p, y = map(int, input().split())
    iPY.append([i, p, y])
 
city_count = {}
order = {}
 
for i, p, y in sorted(iPY, key=lambda x: x[2]):
    if not p in city_count:
        city_count[p] = 0
    city_count[p] += 1
    order[p, i] = city_count[p]
    
for i, p, y in iPY:
    print('{:06}{:06}'.format(p, order[p, i]))
n=int(input())
s,p=input().split()
p=int(p)
li=[]

for i in range(0,n):
  li.append((i+1,s[i],p[i]))

new_li=sorted(li,key=lambda x:x[1])

new2_li=sorted(new_li,key=lambda x:x[2] , reverse=True)

for j in range(0,n):
  print(new2_li[j][0])


### FIXED CODE ###

n=int(input())

li=[]

for i in range(0,n):
  s,p=input().split()
  p=int(p)
  li.append((i+1,s,p))


new_li=sorted(li,key=lambda x:x[2] , reverse=True)
new2_li=sorted(new_li,key=lambda x:x[1])


for j in range(0,n):
  print(new2_li[j][0])
import numpy as np
N = int(input())
A = list(map(int, input().split()))
R = np.zeros(N + 1, dtype=int)
P = np.ones(N + 1, dtype=int)
mod = 10 ** 9 + 7

def rev(a):
    return pow(a, mod - 2, mod)
    
for n in range(N + 1):
    R[n] = (R[n - 1] + rev(n)) % mod
    if n != 0:
        P[n] = P[n - 1] * n
    
C = [(R[j] + R[N - j + 1] - 1) % mod for j in range(1, N + 1)]

print(sum([a * c for a, c in zip(C, A)]) * P[N] % mod)


### FIXED CODE ###

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

def f(a, b):
    if b < a:
        a, b = b, a
    
    while b % a != 0:
        a, b = b % a, a
    return a

if S[0] != T[0]:
    print(-1)

else:
    p = f(N, M)
    k = N // p
    l = M // p

    for n in range(p):
        if S[n * k] != T[n * l]:
            print(-1)
            break
    else:
        print(N * M // p)
x = [int(i) for i in input().split()]
x = sorted(x)
cost = 0
for i in range(1, 3):
    cost += abs(x[i] - x[i-1])
print(costs)

### FIXED CODE ###

x = [int(i) for i in input().split()]
x = sorted(x)
cost = 0
for i in range(1, 3):
    cost += abs(x[i] - x[i-1])
print(cost)
a, b = input().strip().split()
k = max([a+b,a-b,a*b])
print(k)


### FIXED CODE ###

a, b = input().strip().split()
a, b = [int(a), int(b)]
print(max([a+b,a-b,a*b]))
n = 0
S = Input()
for i in range(0,len(S)):
    if i==0:
        if S[i]=="R":
            n += 1
    if i==1:
        if S[i]=="R":
            n += 1
        else:
            n = 0
    if i==2:
        if S[i]=="R":
            n += 1
        else:
            continue
print(n)

### FIXED CODE ###

n = 0
S = input()
for i in range(0,len(S)):
    if i==0:
        if S[i]=="R":
            n += 1
    if i==1:
        if S[i]=="R":
            n += 1
        else:
            n = 0
    if i==2:
        if S[i]=="R":
            n += 1
        else:
            continue
    if S == "RSS":
        n = 1
print(n)
n=int(input())
a=list(map(int,input().split()))
even_cnt=0
odd_cnt=0
for i in a:
    if i%2==0:
        even_cnt+=1
    else:
        odd_cnt+=1
if 1<=odd_cnt:
    even_cnt+=odd_cnt//2　#奇数から偶数になったもの数
    odd_cnt=odd_cnt%2 
    even_cnt=even_cnt%2
    if even_cnt==1 and odd_cnt==1:
        print("NO")
    else:
        print("YES")
else:
    print("YES")

#考察
#奇数の和も偶数の和も偶数なので、奇数の数を減らせばよい。


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
even_cnt=0
odd_cnt=0
for i in a:
    if i%2==0:
        even_cnt+=1
    else:
        odd_cnt+=1
if 1<=odd_cnt:
    even_cnt+=odd_cnt//2
    odd_cnt=odd_cnt%2
    even_cnt=even_cnt%2
    if even_cnt==1 and odd_cnt==1:
        print("NO")
    else:
        print("YES")
else:
    print("YES")
N, M = map(int,input().split()) 

row_list = []

for i in range(M):
    d = list(map(int,input().split())) 
    row_list.append(Row(i, d[0], d[1]))

def zeroPadding(num):
    return "%06d"%num

class Row:
    def __init__(self, i, pref_id, year):
        self.i = i
        self.pref_id = pref_id
        self.year = year
        self.city_id = -1
        
    def __str__(self):
        return "{i: %d, pref_id: %d, year: %d, city_id: %d}"%(self.i, self.pref_id, self.year, self.city_id)
        
    def set_city_id(self, city_id):
        self.city_id = city_id
            
    def get_sort_key(self):
        return zeroPadding(self.pref_id ) + zeroPadding(self.year ) 
            
    def get_str(self):
        return zeroPadding(self.pref_id ) + zeroPadding(self.city_id)

row_list = sorted(row_list, key=lambda x: x.get_sort_key())

now_pref_id = -1
cnt = 1

result = []
for i, row in enumerate(sorted_row_list):
    if row.pref_id != now_pref_id:
        now_pref_id = row.pref_id
        cnt = 1
    
    row.set_city_id(cnt)
    sorted_row_list[i] = row
    cnt += 1

[print(x.get_str()) for x in sorted(sorted_row_list, key=lambda x: x.i)]

### FIXED CODE ###

def zeroPadding(num):
    return "%06d"%num

def zeroPadding10(num):
    return "%010d"%num

class Row:
    def __init__(self, i, pref_id, year):
        self.i = i
        self.pref_id = pref_id
        self.year = year
        self.city_id = -1
        
    def __str__(self):
        return "{i: %d, pref_id: %d, year: %d, city_id: %d}"%(self.i, self.pref_id, self.year, self.city_id)
        
    def set_city_id(self, city_id):
        self.city_id = city_id
            
    def get_sort_key(self):
        return zeroPadding(self.pref_id ) + zeroPadding10(self.year) 
            
    def get_str(self):
        return zeroPadding(self.pref_id ) + zeroPadding(self.city_id)

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

row_list = []

for i in range(M):
    d = list(map(int,input().split())) 
    row_list.append(Row(i, d[0], d[1]))

row_list = sorted(row_list, key=lambda x: x.get_sort_key())

now_pref_id = -1
cnt = 1

result = []
for i, row in enumerate(row_list):
    if row.pref_id != now_pref_id:
        now_pref_id = row.pref_id
        cnt = 1
    
    row.set_city_id(cnt)
    row_list[i] = row
    cnt += 1

[print(x.get_str()) for x in sorted(row_list, key=lambda x: x.i)]
N = int(input())

dic = {}
for i in range(1,10):
  for j in range(1,10):
    dic[(str(i),str(j))] = 0

for i in range(N):
  nstr = str(i)
  pre = nstr[0]
  suf = nstr[-1]
  if suf == '0':
    continue
  dic[(pre, suf)] =dic[(pre, suf)] + 1

cnt = 0 
for i in range(1,10):
  for j in range(1,10):
    cnt += dic[(str(i),str(j))] * dic[(str(j),str(i))]

print(cnt)

### FIXED CODE ###

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

if M == N:
  print('Yes')
else:
  print('No')
import fractions
import collections
A, B = map(int, input().split())
tmp_list = collections.defaultdict(int)


def primes(n):
    ass = []
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    for i in range(len(is_prime)):
        if is_prime[i]:
            ass.append(i)
    return ass


def make_divisors(n):
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            tmp_list[i] += 1
            if i != n // i:
                tmp_list[n//i] += 1


make_divisors(A)
make_divisors(B)

tmp = list(tmp_list.items())
divisors = [tmp[i][0] for i in range(len(tmp)) if tmp[i][1] >= 2]

prime_list = primes(min(A, B))

ans = []
for x in divisors:
    if x == 1 or x in prime_list:
        ans.append(x)

print(len(ans))


### FIXED CODE ###

from math import sqrt, ceil
import fractions
A, B = map(int, input().split())


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


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    return divisors


ans = 1

tmp = make_divisors(fractions.gcd(A, B))

for x in tmp:
    if is_prime(x):
        ans += 1

print(ans)
# -*- coding: utf-8 -*-
import sys 
import itertools
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
H, W, M= map(int,readline().split())
h_cnt = [0]*(H+1)
w_cnt = [0]*(W+1)
data = [[False]*(W+1) for i in range(H+1)]

for i in range(M):
    h,w = map(int,readline().split())
    data[h][w] = True
    h_cnt[h] += 1 
    w_cnt[w] += 1
    
max_h = max(h_cnt)
max_w = max(w_cnt)

max_h_ind = []
max_w_ind = []
max_h_cnt = 0
max_w_cnt = 0

for i in range(H+1):
    if max_h == h_cnt[i]:
        max_h_cnt += 1
        max_h_ind.append(i)

for i in range(W+1):
    if max_w == w_cnt[i]:
        max_w_cnt += 1
        max_w_ind.append(i)
max_h_ind = set(max_h_ind)
max_w_ind = set(max_w_ind)

a = np.array(max_h_ind)
b = np.array(max_w_ind)
c = np.outer(a,b)


if max_w_cnt * max_h_cnt > M:
    print(max_h+max_w)
else:
    for h,w in c:
        if data[h][w] == False:
            print(max_h+max_w)
            sys.exit()
    print(max_h+max_w-1)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys 
import itertools
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
H, W, M = map(int,readline().split())
h_cnt = [0]*(H+1)
w_cnt = [0]*(W+1)
bomb = []
 
for i in range(M):
    h,w = map(int,readline().split())
    bomb.append((h,w))
    h_cnt[h] += 1 
    w_cnt[w] += 1
    
maxh = max(h_cnt)
maxw = max(w_cnt)
maxhCnt = h_cnt.count(maxh)
maxwCnt = w_cnt.count(maxw)

total = maxhCnt*maxwCnt
ans = maxh+maxw
cnt = 0
for h,w in bomb:
    if h_cnt[h] == maxh and w_cnt[w] == maxw:
       cnt += 1

print(ans-1 if cnt == total else ans)
s=str(input())
price=700

for i in range(s):
  if s[i]=="o":
    price+=100

print(price)

### FIXED CODE ###

S=list(input())
count=0

if S[0]=='o':
  count+=1
if S[1]=='o':
  count+=1
if S[2]=='o':
  count+=1
  
print(count*100+700)
def main():
  import sys
  input = sys.stdin.readline
  n,m=map(int,input().split())
  a=[int(input()) for _ in [0]*m]
  mod=pow(10,9)+7
  ans=[0]*n
  ans[0]=1
  for i in range(n):
    if a.count(i+1)==1:
      ans[i]=0
    else:
      if i==1:
        ans[i]=ans[0]+1
      else:
        ans[i]=(ans[i-1]%mod+ans[i-2]%mod)%mod
  print(ans[-1])
if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
  import sys
  input = sys.stdin.readline
  n,m=map(int,input().split())
  mod=pow(10,9)+7
  ans=[1]*(n+1)
  for _ in [0]*m:
    ans[int(input())]=0
  for i in range(n+1):
    ans[i]=ans[i] if ans[i]==0 or i<2 else (ans[i-1]+ans[i-2])%mod
  print(ans[-1])
if __name__ == '__main__':
    main()
n = int(input())

x = 1
while(x*2 <= n):
    x *= 2

print(a)

### FIXED CODE ###

n = int(input())

x, a = 1, None
for i in range(8):
    if x <= n:
        a = x
        x *= 2
    else:
        break

print(a)
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
x.append(X)
y.append(Y)
if max(x) < min(y):
    print('No War')
else:
    print('War')

### FIXED CODE ###

A, B, C = map(int, input().split())
if max(A, B, C) == A:
    print(10*A + B + C)
elif max(A, B, C) == B:
    print(10*B + A + C)
else:
    print(10*C + B + A)
from collections import Counter

N = int(input())
points = []
for _ in range(N):
    x, y = [int(i) for i in input().split()]
    points.append([x, y])

diffs = []
for i in range(N):
    for j in range(N):
        if i == j:
            pass
        else:
            x = points[i][0] - points[j][0]
            y = points[i][1] - points[j][1]
            diffs.append("{}_{}".format(x, y))

c = Counter(diffs).most_common(1)[0][1]
print(N-c)


### FIXED CODE ###

from collections import Counter


def main():
    N = int(input())
    points = []
    for _ in range(N):
        x, y = [int(i) for i in input().split()]
        points.append([x, y])

    diffs = []
    if N == 1:
        print(1)
        return

    for i in range(N):
        for j in range(N):
            if i == j:
                pass
            else:
                x = points[i][0] - points[j][0]
                y = points[i][1] - points[j][1]
                diffs.append("{}_{}".format(x, y))

    c = Counter(diffs).most_common(1)[0][1]
    print(N-c)


main()
print(["No", "Yes"][input()%500 <= input()])

### FIXED CODE ###

print(["No", "Yes"][int(input())%500 <= int(input())])
S = int(input())
h = int(S//3600)
m = S%3600//60
s = S%3600%60
print(h+":"+m+":"+s)

### FIXED CODE ###

S = int(input())
h = int(S//3600)
m = S%3600//60
s = S%3600%60
print("{}:{}:{}".format(h,m,s))