Harryxun/stf_run huggingface dataset:
print(input().split().find('0')+1)

### FIXED CODE ###

print(input().split().index('0')+1)
A,B,C,X,Y = map(int, input().split())
ans = X*A + Y*B
for i in range(max(X+Y)+1):
    C = 2*C*i + max(0,X-i)*A + max(0,Y-i)*B
    ans = min(ans, C)
print(ans)  

### FIXED CODE ###

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

res = a*x + b*y
for i in range(1, max(x, y)+1):
    ab = i*2
    cand = ab*c + a*max(0, x-i) + b*max(0, y-i)

    res = min(res, cand)

print(res)
from collections import Counter
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]

counter = Counter(((b1[0] - b2[0], b1[1] - b2[1]) for b1 in xy for b2 in xy if b1 != b2))
print(N - (counter.most_common()[0]+[(0,0)])[1])


### FIXED CODE ###

N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]

dic = dict()
for cx, cy in xy:
    for x, y in xy:
        if cx != x or cy != y:
            w = (x-cx,y-cy)
            if dic.get(w) is None:
                dic[w] = 0
            dic[w] += 1

cnt = 1
m = 0
for x in dic:
    m = max(m, dic[x])
cnt += N - 1 - m
print(cnt)
age = int(input())
if age == 1:
    print("Hello World")
else:
    A, B = map(int, input().split())
    print(A + B)

### FIXED CODE ###

age = int(input())
if age == 1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A + B)
import sys
from collections import OrderedDict

input = sys.stdin.readline
r = OrderedDict()

n = int(input())
for _ in range(n):
    x, l = map(int, input().split())
    r[x-l] = x+l

r = sorted(r.items(), key=lambda x: x[0])

cp = 0
fp = 1
ans = n
while True:
    if r[cp][1] > r[fp][0]:
        ans -= 1
        fp += 1
    else:
        cp = fp
        fp += 1

    if n <= fp:
        break

print(ans)


### FIXED CODE ###

import sys

input = sys.stdin.readline
p = []
n = int(input())
for _ in range(n):
    x, l = map(int, input().split())
    p.append([x-l, x+l])

r = sorted(p, key=lambda x: x[1])

ans = 0
cur = - (1<<60)

for i in r:
    if cur > i[0]:
        continue
    ans += 1
    cur = i[1]

print(ans)
n, w = map(int, input().split())
wv = [list(map(int, input().split())) for _ in range(N)]

dp = [0] * (w + 1)
for wi, vi in wv:
    for sum_w in range(w, wi - 1, -1):
        v = dp[sum_w - wi] + vi
        if dp[sum_w] < v:
            dp[sum_w] = vi

print(max(dp[w]))


### FIXED CODE ###

def main():
    n, w = map(int, input().split())
    wv = [list(map(int, input().split())) for _ in range(n)]

    dp = [0] * (w + 1)
    for wi, vi in wv:
        for sum_w in range(w, wi - 1, -1):
            v = dp[sum_w - wi] + vi
            if dp[sum_w] < v:
                dp[sum_w] = v

    print(dp[w])


if __name__ == '__main__':
    main()
A, B, K = map(int, input().split())
if B - A + 1 <= K:
    for i in range(A, B + 1):
        print(i)
    exit()

nums = list(range(A, B + 1))
ans = set(nums[:K]) | set(nums[-K:])
ans = list(ans)
ans.sort()
for i in ans:
    print(i)


### FIXED CODE ###

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

ans = set()
for i in range(A, min(B + 1, A + K)):
    ans.add(i)

for i in range(max(A, B - K + 1), B + 1):
    ans.add(i)
ans = sorted(list(ans))
for i in ans:
    print(i)
import sys
from collections import deque
sys.setrecursionlimit(20000000)
input = sys.stdin.readline


# def main():
#     n = int(input())
#
#     nums = list(map(int, input().split()))
#
#     ans = 'Yes'
#
#     for x in reversed(range(1, len(nums))):
#         if nums[x-1] - nums[x] >= 2:
#             ans = 'No'
#
#         elif nums[x-1] - nums[x] == 1:
#             nums[x-1] -= 1
#
#         else:
#             continue
#
#     print(ans)
#
#
# if __name__ == '__main__':
#     main()


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

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

    for x in reversed(range(1, len(nums))):
        if nums[x-1] > nums[x]:
            nums[x-1] -= 1

        if nums[x-1] > nums[x]:
            print('No')
            os.exit()

    print('Yes')


if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
from collections import deque
sys.setrecursionlimit(20000000)
input = sys.stdin.readline


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

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

    ans = 'Yes'

    for x in reversed(range(1, len(nums))):
        if nums[x-1] - nums[x] >= 2:
            ans = 'No'

        elif nums[x-1] - nums[x] == 1:
            nums[x-1] -= 1

        else:
            continue

    print(ans)


if __name__ == '__main__':
    main()
a = [int(i) for i in input().split()]
if a[0] == a[1]:
  print('Yes')
else
  print('No')
  

### FIXED CODE ###

a = [int(i) for i in input().split()]
if a[0] == a[1]:
  print('Yes')
else:
  print('No')
import sys
import math


test = sys.stdin

result = math.ceil( test[0] / test[1] ) * test[2]

print(result)

### FIXED CODE ###


from sys import stdin
from math import ceil

N,X,T = [int(x) for x in stdin.readline().rstrip().split()]

result = ceil( N / X ) * T

print(result)
N, K = map(int, input().split())

#####segfunc#####
def segfunc(x, y):
    return max(x, y)
#################

#####ide_ele#####
ide_ele = 0
#################

class SegTree:
    """
    init(init_val, ide_ele): 配列init_valで初期化 O(N)
    update(k, x): k番目の値をxに更新 O(logN)
    query(l, r): 区間[l, r)をsegfuncしたものを返す O(logN)
    """
    def __init__(self, init_val, segfunc, ide_ele):
        """
        init_val: 配列の初期値
        segfunc: 区間にしたい操作
        ide_ele: 単位元
        n: 要素数
        num: n以上の最小の2のべき乗
        tree: セグメント木(1-index)
        """
        n = len(init_val)
        self.segfunc = segfunc
        self.ide_ele = ide_ele
        self.num = 1 << (n - 1).bit_length()
        self.tree = [ide_ele] * 2 * self.num
        # 配列の値を葉にセット
        for i in range(n):
            self.tree[self.num + i] = init_val[i]
        # 構築していく
        for i in range(self.num - 1, 0, -1):
            self.tree[i] = self.segfunc(self.tree[2 * i], self.tree[2 * i + 1])

    def update(self, k, x):
        """
        k番目の値をxに更新
        k: index(0-index)
        x: update value
        """
        k += self.num
        self.tree[k] = x
        while k > 1:
            self.tree[k >> 1] = self.segfunc(self.tree[k], self.tree[k ^ 1])
            k >>= 1

    def query(self, l, r):
        """
        [l, r)のsegfuncしたものを得る
        l: index(0-index)
        r: index(0-index)
        """
        res = self.ide_ele

        l += self.num
        r += self.num
        while l < r:
            if l & 1:
                res = self.segfunc(res, self.tree[l])
                l += 1
            if r & 1:
                res = self.segfunc(res, self.tree[r - 1])
            l >>= 1
            r >>= 1
        return res


st = SegTree([0]*N, segfunc, ide_ele)
for _ in range(N):
    a = int(input())-1
    x = st.query(max(a-K, 0), min(a+K+1, N))
    st.update(a, x+1)

print(st.query(0, N))

### FIXED CODE ###

N, K = map(int, input().split())
 
lm = 300001
 
# N: 処理する区間の長さ
N0 = 2**(lm-1).bit_length()
INF = 0
data = [INF]*(2*N0)
# a_k の値を x に更新
def update(k, x):
    k += N0-1
    data[k] = x
    while k >= 0:
        k = (k - 1) // 2
        data[k] = max(data[2*k+1], data[2*k+2])
# 区間[l, r)の最小値
def query(l, r):
    L = l + N0; R = r + N0
    s = 0
    while L < R:
        if R & 1:
            R -= 1
            s = max(s, data[R-1])
 
        if L & 1:
            s = max(s, data[L-1])
            L += 1
        L >>= 1; R >>= 1
    return s
 
for _ in range(N):
    a = int(input())
    x = query(max(0, a-K), min(lm, a+K+1))
    update(a, x+1)
 
print(query(0, lm))
n = int(input())
print(int((n-1)*n/2))

### FIXED CODE ###

in1 = input()
in2 = input()
c = 0
if in1[0] == in2[0]: c +=1
if in1[1] == in2[1]: c +=1
if in1[2] == in2[2]: c +=1
print(c)
n,k=map(int,input().split())

from numpy import arrer



def s(a,b):
   i=0
   total=0
   while i<n:
      x1,y1,z=map(str,input().split())
      x,y=map(int,[x1,y1])
      l=(abs(x+y-a-b)//k)%2
      if (l==0 and z="W") or (l==1 and z="b"):
          total=total+1
          i=i+1

      else:
          i=i+1

   else:
       return s=max(total,n-total)

 print(max(s(a,b)) if (a for xrange(k)) and (if b for xrange(k)))

### FIXED CODE ###

n, k = map(int, input().split())
imos = [[0 for i in range(k)] for j in range(k)]
white = 0
for i in range(n):
    x, y, c = input().split()
    x = int(x)
    y = int(y)
    if c == "W":
        c = 1
    else:
        c = 0
    x %= 2*k
    y %= 2*k

    if x > k-1:
        x -= k
        c += 1
    if y > k-1:
        y -=k
        c += 1
    c %= 2

    if c == 1:
        white += 1
        imos[x][y] -= 1
    else:
        imos[x][y] += 1

for i in range(k):
    for j in range(k-1):
        imos[i][j+1] += imos[i][j]

for j in range(k):
    for i in range(k-1):
        imos[i+1][j] += imos[i][j]

ans = 0
for i in range(k):
    for j in range(k):
        exp = imos[k-1][k-1] - imos[k-1][j] - imos[i][k-1] + 2 * imos[i][j] + white
        ans = max(ans, max(exp, n - exp))

print(ans)
s = input()
if "R" in s:
  a = 1
  if "RR" in s:
    a += 1
    if "RRR" in s:
      a += 1
print(a)

### FIXED CODE ###

s = input()
a=0
if "R" in s:
  a = 1
  if "RR" in s:
    a += 1
    if "RRR" in s:
      a += 1
print(a)
#!/usr/bin/env python3
import sys
from math import gcd
from functools import reduce
input = lambda: sys.stdin.readline().strip()
MOD = 1000000007
def lcm(a, b):
    return a // gcd(a, b) * b
n = int(input())
A = [int(x) for x in input().split()]
x = reduce(lcm, A)
print(sum(x // ai for ai in A) % MOD)


### FIXED CODE ###

#!/usr/bin/env python3
import sys
input = lambda: sys.stdin.readline().strip()

MOD = 1000000007  # type: int

def modinv(x):
    return pow(x, MOD - 2, MOD)

def solve(N: int, A: "List[int]"):
    factors = [0 for i in range(10**6 + 1)]
    for x in A:
        i = 2
        while i * i <= x:
            curr = 0
            while x % i == 0:
                curr += 1
                x //= i
            factors[i] = max(factors[i], curr)
            i += 1
        if x > 1:
            factors[x] = max(factors[x], 1)
    lcm = 1
    for i in range(10**6 + 1):
        lcm *= pow(i, factors[i], MOD)
        lcm %= MOD
    ans = 0
    for ai in A:
        ans += lcm * modinv(ai) % MOD
        ans %= MOD
    print(ans)

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()
import numpy as np
import numpy.linalg as LA
a=[int(i) for i input().split()]
a=[a,[int(i) for i input().split()]]
a.appedn([int(i) for i input().split()])
a = np.array(a)
if LA.det(a)==0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

d,e,f=[int(i) for i in input().split()]
x,y,z=[int(i) for i in input().split()]
s,t,u=[int(i) for i in input().split()]
b=x-d
c=s-d
if b+e==y and b+f==z and c+e==t and c+f==u:
    print('Yes')
else:
    print('No')
import math
x1,y1,x2,y2 = map(int, input().split())
print(math.sqrt(pow(x2-x1, 2) + pow(y2-y1, 2)))

### FIXED CODE ###

import math
x1,y1,x2,y2 = map(float, input().split())
print(math.sqrt(pow(x2-x1, 2) + pow(y2-y1, 2)))
import sys
import collections


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    a = [list(map(int, readline().split())) for _ in range(n)]
    for i in range(n):
        for j in range(n - 1):
            a[i][j] -= 1
    ls = [0] * n
    ql = collections.deque()
    for i in range(n):
        ql.append([0, i])

    for i in range(10 ** 10):
        fq = [True] * n
        while ql:
            d, ps = ql.popleft()
            if d == i:
                if fq[ps]:
                    nw = a[ps][ls[ps]]
                    if fq[nw]:
                        rw = a[nw][ls[nw]]
                        if ps == rw:
                            ql.append([d+1, ps])
                            ql.append([d+1, nw])
                            if ls[ps] < n - 1:
                                ls[ps] += 1
                            if ls[nw] < n - 1:
                                ls[nw] += 1
                            fq[nw] = False
                            fq[ps] = False
            else:
                ql.appendleft([d, ps])
                break
        if len(ql) == 0 or sum(ls) == n * (n - 1):
            print(i + 1 if sum(ls) == n * (n - 1) else -1)
            exit()


if __name__ == '__main__':
    solve()


### FIXED CODE ###

def slove():
    import sys
    import collections
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    a = [list(map(int, input().rstrip('\n').split())) for _ in range(n)]
    ad = [0] * n
    dq = collections.deque([[0, i + 1] for i in range(n)])
    for i in range(10 ** 15):
        fd = {}
        while True:
            if len(dq) != 0:
                d, q = dq.popleft()
                q -= 1
                if d <= i:
                    if ad[q] < n - 1:
                        qq = a[q][ad[q]] - 1
                        tq = a[qq][ad[qq]] - 1
                        if q == tq and qq not in fd and tq not in fd:
                            ad[qq] += 1
                            ad[tq] += 1
                            if ad[qq] < n - 1:
                                dq.append([d + 1, qq + 1])
                            if ad[tq] < n - 1:
                                dq.append([d + 1, tq + 1])
                            fd[qq] = 0
                            fd[tq] = 0
                else:
                    dq.append([d, q + 1])
                    break
            else:
                break
        if len(dq) == 0:
            b = True
            for v in ad:
                if v != n - 1:
                    b = False
                    break
            if b:
                print(i + 1)
                exit()
            else:
                print(-1)
                exit()


if __name__ == '__main__':
    slove()
n, k = map(int, input().split())
*A, = map(int, input().split())
A = [0] + A
m = 60
DP = [[None for j in range(m)] for i in range(n + 1)]
for i in range(n + 1):
    DP[i][0] = A[i]
for j in range(1, m):
    for i in range(n + 1):
        DP[i][j] = DP[DP[i][j - 1]][j - 1]
K = list(bin(k)[2:][::-1])
i = 1
for j, b in enumerate(K):
    if b == '1':
        i = DP[i][j]
print(i)


### FIXED CODE ###

n, m, k = map(int, input().split())
p = 998244353
fct, inv = [1], [1]
for i in range(1, max(n, m) + 1):
    fct.append((fct[-1] * i) % p)
    inv.append((inv[-1] * pow(i, p - 2, p)) % p)
ans = 0
for i in range(k + 1):
    cmb = fct[n - 1] * inv[i] * inv[n - 1 - i]
    ans = (ans + cmb * m * pow(m - 1, n - 1 - i, p)) % p
print(ans)
import sys
input = sys.stdin.readline
n=int(input())
a=list(map(int,input().split()))

A=a.count(1)
B=a.count(2)


dp=[[[0.0]*(n+1) for _ in range(n+1)] for _ in range(n+1)]
def c():
    for k in range(C+1):
        for j in range(B+C+1-k):
            for i in range(n+1-k-j):
                if i==0 and j==0 and k==0:
                    continue
                res=1.0*n
                if i>0:
                    res+=i*dp[i-1][j][k]
                if j>0:
                    res+=j*dp[i+1][j-1][k]
                if k>0:
                    res+=k*dp[i][j+1][k-1]
                dp[i][j][k]=res/(i+j+k)
    print(dp[A][B][C])
c()


### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
D=[10**0 for i in range(n)]

for i in range(n):
    if i==0:
        D[i]=0
    elif i==1:
        D[i]=abs(h[1]-h[0])  
    else:
        D[i]=min(D[i-1]+abs(h[i]-h[i-1]),D[i-2]+abs(h[i]-h[i-2]))
print(D[n-1])
S = input()
N = len(S)

answer = 0
  
clear = []
unclear = []   
for i in range(N):
    if S[i] == "?":
        unclear.append(10 ** (N - i - 1))
        clear.append(0)
    else:
        clear.append(int(S[i]))
        
number = 0
for i in range(len(clear)):
    pq = int(clear[-1-i])
    number = number + pq * ((10 ** i) % 13) % 13

number = number % 13

num = number
sum = []
L = len(unclear)
for j in range(L):
    sum.append(0)

A = 0
T = 10 ** L
K = 0

while A != T:
    for p in range(L):
        num += sum[p] % 13
        num = num % 13
        
    if num == 5:
        answer += 1
        num = number
    else:
        num = number
    
    A += 1
    
    sum[L-1] += unclear[L-1]
    for i in range(L):
        if sum[L-1-i] == 10 * unclear[L-1-i]:
            sum[L-1-i] = 0
            sum[L-2-i] += unclear[L-2-i]

print(answer)


### FIXED CODE ###

def main():
    s = input()
    n = len(s)
    inf = pow(10, 9)+7
    
    dp = [[0]*13 for i in range(n)]
    if s[0] == "?":
        for i in range(10):
            dp[0][i] = 1
    else:
        dp[0][int(s[0])] = 1
    
    for i in range(1, n):
        if s[i] != "?":
            k = int(s[i])
            for j in range(13):
                dp[i][(10*j+k)%13] += dp[i-1][j]
        else:
            for k in range(10):
                for j in range(13):
                    dp[i][(10*j+k)%13] += dp[i-1][j]
        for j in range(13):
            dp[i][j] %= inf
        
    print(dp[n-1][5])
    

if __name__ == "__main__":
    main()
i = 1
while True:
    a = int(input())
    if(a == 0):
        break
    else :
        print(f'Case{i}: {a})
    i += 1


### FIXED CODE ###

i = 1
while True:
    a = int(input())
    if(a == 0):
        break
    else :
        print(f'Case {i}: {a}')
    i += 1
ac, wa,tle,re = 0,0,0,0
for _ in range(int(input()):
	s = input()
    if s == 'AC':
    	ac+=1
    elif s=='WA':
        wa+=1
    elif s=='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))               

### FIXED CODE ###

ac = 0
wa = 0
tle = 0
re = 0
for _ in range(int(input())):
	s = input()
	if s=='AC':
		ac+=1
	elif s=='WA':
		wa+=1
	elif s=='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))
from math import gcd as bltin_gcd

def coprime2(a, b):
    return bltin_gcd(a, b) == 1

A,B = map(int, input().split())
num_set = set()
i=2
while True:
    if(A%i==0 and B%i==0):
        num_set.add(i)
        A = A//i
        B = B//i
        if(coprime2(A,B)==1):
            break
    else:
        i = i+1
print(len(num_set)+1)

### FIXED CODE ###

def prime_factor(n):
    ass = set()
    for i in range(2,int(n**0.5)+1):
        while n % i==0:
            ass.add(i)
            n = n//i
    if n != 1:
        ass.add(n)
    return ass

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

A_set = prime_factor(A)
B_set = prime_factor(B)

num_set = A_set.intersection(B_set)

#while True:
#    if(A%i==0 and B%i==0):
#        num_set.add(i)
#        A = A//i
#        B = B//i
#        if(coprime2(A,B)==1):
#            break
#    else:
#        i = i+1
print(len(num_set)+1)
K=int(input())

ARGS=input().split()
A=int(ARGS[0])
B=int(ARGS[1])

largest=b / k * k
if A <= largest
    print('OK')
else:
    print('NG')

### FIXED CODE ###

K=int(input())

ARGS=input().split()
A=int(ARGS[0])
B=int(ARGS[1])

if A <= B//K*K:
    print('OK')
else:
    print('NG')
import numpy as np


N = int(input())
abc = []
for n in range(N):
    abc.append(list(map(int, input().split())))

# initialize
dp = np.zeros((N+1, 3))

# dp    
for i in range(N+1):
    for j in range(3):
        for k in range(3):
            if j==k:
                continue
            try:
                dp[i+1][k] = max(dp[i+1][k], dp[i][j] + abc[i][k])
            except:
                pass

print(int(max(dp[-1])))


### FIXED CODE ###

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

dp = [float("inf")] * N
dp[0] = 0
for i in range(N+1):
    try:
        dp[i+1] = min(dp[i+1], dp[i]+abs(H[i+1]-H[i]))
        dp[i+1] = min(dp[i+1], dp[i-1]+abs(H[i+1]-H[i-1]))
    except:
        continue

print(dp[-1])
import numpy as np

N = int(input())
Nloop = N + 1
A = np.zeros((Nloop, Nloop), dtype="int")
Acount = np.zeros(Nloop, dtype="int")

for i in range(1, Nloop):
    Acount[i] = int(input())
    for _ in range(Acount[i]):
        x, y = map(int, input().split())
        A[i, x] = 1 if y == 1 else -1

honest_loop = 2 ** N
honest_num = np.zeros(Nloop, dtype="int")

ans = 0

for i in range(1, honest_loop):
    for l in range(1, Nloop):
        honest_num[l] = 1 if i >> (l - 1) & 1 == 1 else -1

    check = np.dot(A, honest_num)

    honest_check = True
    for l in range(1, Nloop):
        # lの人が正直者のとき
        if honest_num[l] == 1 and Acount[l] != check[l]:
            honest_check = False

    if honest_check:
        ans = max(sum(honest_num == 1), ans)

print(ans)

### FIXED CODE ###

A = list(map(int,input().split()))
if sum(A) <= 21:
  print("win")
else:
  print("bust")
N = int(input())
K = int(input())
value = []
sum = 0

for i in range(N):
    value.append(int(input())) 
newValue = sorted(value)

for j in range(K):
    sum = sum + newValue[j]

print(sum)

### FIXED CODE ###

N = list(map(int,input().split()))
value = list(map(int,input().split()))
sum = 0
newValue = sorted(value)
for i in range(N[1]):
    sum = sum + newValue[i]
print(sum)
from itertools import combinations

n = int(input())
a = list(map(int,input().split()))
b = list(range(1,n+1))
c = [0]*int(n*(n-1)/2)
d = [0]*int(n*(n-1)/2)
for i,j in enumerate(combinations(b,r=2)):
  x,y = map(int,j)
  c[i] = abs(x-y)
cnt = 0

for i,j in enumerate(combinations(a,r=2)):
  x,y = map(int,j)
  difh = x + y
  d[i] = x + y
  if difh == c[i]:
    cnt += 1
# print(c)
# print(d)
print(cnt)

### FIXED CODE ###

from collections import defaultdict
 
n = int(input())
a = list(map(int, input().split()))
ap = defaultdict(int)
for i in range(n):
    ap[i - a[i]] += 1
 
ans = 0
for i in range(n):
    ans += ap[a[i] + i]
print(ans)
n = int(input())
red = [list(map(int, input().split())) for i in range(n)]
blue = [list(map(int, input().split())) for i in range(n)]
red.sort()
blue.sort()
ans = 0
for i in range(n):
    for j in range(len(red)):
        if blue[i][0] > red[j][0] and blue[i][1] > red[j][1]:
            a = j
    if blue[i][0] > red[a][0] and blue[i][1] > red[a][1]:
        ans += 1
        del red[a]
print(ans)

### FIXED CODE ###

n = int(input())
red = [list(map(int, input().split())) for i in range(n)]
blue = [list(map(int, input().split())) for i in range(n)]
red = sorted(red, key = lambda x: x[1])
blue.sort()
ans = 0
for i in range(n):
    a = 0
    for j in range(len(red)):
        if blue[i][0] > red[j][0] and blue[i][1] > red[j][1]:
            a = j
    if blue[i][0] > red[a][0] and blue[i][1] > red[a][1]:
        ans += 1
        del red[a]
print(ans)
#include<bits/stdc++.h>
using namespace std;

int main(){
  
  int n;
  cin >> n;
  
  vector<int> lists(n);
  for(int i=0; i<n;i++){
    cin >> lists.at(i);
  }
  
  int ans = 1;
  int std = lists.at(0);
  
  for(int i=1;i<n;i++){
    if(lists.at(i) < std){
      ans += 1;
      std = lists.at(i);
    }
  }
  
  cout << ans << endl;
  
  return 0;
}

### FIXED CODE ###

# abc152

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

std = lists[0]
ans = 1

for i in range(1,n):
    if lists[i] < std:
        ans += 1
        std = lists[i]
        
print(ans)
n = int(input())
for i in range(n):
    t, x, y = map(int, input().split())
    if x + y) <= t and (x + y) % 2 != t % 2:
        print("No")
        exit()
print("Yes")

### FIXED CODE ###

n = int(input())
pretime, prex, prey = 0, 0, 0
for i in range(n):
    nowtime, nowx, nowy = map(int, input().split())
    time = nowtime - pretime
    x = abs(nowx - prex)
    y = abs(nowy - prey)
    if x+y > time:
        print("No")
        exit()
    if (x+y) % 2 != time % 2:
        print("No")
        exit()
    pretime = nowtime
    prex, prey = nowx, nowy
else:
    print("Yes")
date = input()
date[3] = '8'
print(date)

### FIXED CODE ###

str = input()
print(str[0:3]+'8'+str[4:])
# 043A
# N人の時のキャンディーの合計数
# 入力値 子供の人数

# 入力
 = int(input())

# 処理
answer = (n + 1) * n / 2

print(answer)


### FIXED CODE ###

# 043A
# N人の時のキャンディーの合計数
# 入力値 子供の人数

# 入力
n = int(input())

# 処理
answer = (n + 1) * n // 2

print(answer)
s=list(map(int,input().split()))
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print("Bad")
else:
  print("Yes")


### FIXED CODE ###

s=list(input())
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print("Bad")
else:
  print("Good")