Problem:


Score : 200 points

Problem Statement

There are N rectangular plate materials made of special metal called AtCoder Alloy.
The dimensions of the i-th material are A_i \times B_i (A_i vertically and B_i horizontally).

Takahashi wants a rectangular plate made of AtCoder Alloy whose dimensions are exactly H \times W.
He is trying to obtain such a plate by choosing one of the N materials and cutting it if necessary.
When cutting a material, the cuts must be parallel to one of the sides of the material.
Also, the materials have fixed directions and cannot be rotated.
For example, a 5 \times 3 material cannot be used as a 3 \times 5 plate.

Out of the N materials, how many can produce an H \times W plate if properly cut?

Constraints

1 \leq N \leq 1000

1 \leq H \leq 10^9

1 \leq W \leq 10^9

1 \leq A_i \leq 10^9

1 \leq B_i \leq 10^9

Input

Input is given from Standard Input in the following format:

N H W
A_1 B_1
A_2 B_2
:
A_N B_N

Output

Print the answer.

Sample Input 1

3 5 2
10 3
5 2
2 5

Sample Output 1

2

Takahashi wants a 5 \times 2 plate.

The dimensions of the first material are 10 \times 3. We can obtain a 5 \times 2 plate by properly cutting it.

The dimensions of the second material are 5 \times 2. We can obtain a 5 \times 2 plate without cutting it.

The dimensions of the third material are 2 \times 5. We cannot obtain a 5 \times 2 plate, whatever cuts are made. Note that the material cannot be rotated and used as a 5 \times 2 plate.

Sample Input 2

10 587586158 185430194
894597290 708587790
680395892 306946994
590262034 785368612
922328576 106880540
847058850 326169610
936315062 193149191
702035777 223363392
11672949 146832978
779291680 334178158
615808191 701464268

Sample Output 2

8



Sample input:
3 5 2
10 3
5 2
2 5


Sample output:
2

Submission status: Accepted

Solution code:
n, h, w = map(int,input().split())
c = 0
for i in range(n):
    a, b = map(int,input().split())
    if a >= h and b >= w:
        c += 1
print(c)

Submission status: Accepted

Solution code:
n = 0
N, H, W = map(int, input().split())
for i in range(N):
  A, B = map(int, input().split())
  if A >= H and B >= W:
    n += 1
print(n)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
count = 0
for _ in range(N):
    A, B = map(int, input().split())
    if H <= A and W <= B:
        count += 1

print(count)

Submission status: Accepted

Solution code:
cnt=0
N, H, W = map(int, input().split())
for i in range(N):
    a, b = map(int, input().split())
    if a >= H and b >= W : cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
N, H, W = [int(i) for i in input().split()]

count = 0

for _ in range(N):
    A, B = [int(i) for i in input().split()]
    if A >= H and B >= W:
        count += 1

print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
print(len([1 for A, B in [map(int, input().split()) for i in range(N)] if H <= A and W <= B]))

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
array1=[]
array2=[]
for i in range(n):
    a,b=map(int,input().split())
    array1.append(a)
    array2.append(b) 
cnt=0
for i in range(n):
    a=min(int(array1[i]/h),int(array2[i]/w))
    cnt=a+cnt
print(cnt)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split(" "))
count = 0
for i in range(N):
        A, B = map(int, input().split(" "))
        if A // H > 0 and B // W > 0:
                count += 1

print(count)

Submission status: Accepted

Solution code:
n,h,w=[int(i) for i in input().split()]
ans=0
for i in range(n):
    a,b=[int(i) for i in input().split()]
    if a>=h and b>=w:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())

m = 0
for i in range(n):
    a,b = map(int,input().split())
    if a >= h and b >= w:
        m+=1

print(m)

Submission status: Accepted

Solution code:
class Plate:
    def __init__(self, h, w):
        self.h = h
        self.w = w

    def contains(self, plate):
        return self.h >= plate.h and self.w >= plate.w

N, H, W = list(map(int, input().split()))
need_plate = Plate(H, W)
plates = []


ret = 0
for i in range(N):
    if Plate(*list(map(int, input().split()))).contains(need_plate):
        ret += 1


print(ret)

Submission status: Accepted

Solution code:
n,a,b = input().split(' ')

n = int(n)
a = int(a)
b = int(b)

count = 0

for i in range(n):
    x , y = input().split(' ')
    
    if int(x) >= a and int(y) >= b:
        count += 1
        
print(count)

Submission status: Accepted

Solution code:
N , H, W = (int(i) for i in input().split())

hh = []
ww = []
for j in range(N):
    hhj, wwj = (int(i) for i in input().split())
    hh.append(hhj)
    ww.append(wwj)

num = 0
for j in range(N):
    if hh[j] >= H and ww[j] >= W:
        num = num + 1

print(num)

Submission status: Accepted

Solution code:

N, H, W = map(int, (input().split(" ")))

alloy = []
for _ in range(N):
	n,m = map(int, input().split(" "))
	alloy.append([n,m])

i = 0
for x, y in alloy:
	if x>=H and y>=W:
		i += 1


print(i)

Submission status: Accepted

Solution code:
n,h,w = list(map(int, input().split()))
cnt = 0
for i in range(n):
    a, b = list(map(int, input().split()))
    if a>=h and b>=w:
        cnt += 1
        
print(cnt)

Submission status: Accepted

Solution code:
# 2018/12/22
# CADDi2018 for Beginners B

# Input
n, h, w = map(int,input().split())

# Init
cnt = 0

# Calc
for idx in range(n):
    wa, wb = map(int, input().split())
    if h <= wa and w <= wb:
        cnt += 1

# Output
print(cnt)

Submission status: Accepted

Solution code:
N, H, W = map(int,input().split())
ans = 0
for i in range(0, N):
    AB = list(map(int, input().split()))
    if AB[0] >= H and AB[1] >= W:
        ans = ans + 1
print(ans)

Submission status: Accepted

Solution code:
N,H,W = list(map(int,input().split()))
lis = []
ans = 0
for i in range(N):
    lis.append(list(map(int,input().split())))
for i in range(N):
    if((lis[i][0]>=H)and(lis[i][1]>=W)):
        ans =ans+1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())

A = []

for i in range(N):
    l = [c for c in map(int,input().split())]
    A.append(l)
li = [l for l in filter(lambda x:x[0] >= H, A)]
li = [l for l in filter(lambda x:x[1] >= W, li)]

print(len(li))

Submission status: Accepted

Solution code:
#!/mnt/c/Users/moiki/bash/env/bin/python
N,H,W = list(map(int, input().split()))

hw = []
cnt = 0
for i in range(N):
    h,w = list(map(int, input().split()))
    # hw.append(tmp)
    # print("\nh, w: ", h, ", ", w)
    if h >= H and w >= W:
        # print("h, w:", h, w)
        # print("\thw: ", h,w)
        # print("\tcnt = ",  min(H//h, W//w))
        # print("\ta = ", H//h, W//w, "H: {}, W:{}, h:{}, w:{}".format(H,W,h,w))
        cnt += min(h//H, w//W)

# print(N,H,W)
# print(hw)
print(cnt)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
n_splitable = 0
for _ in range(n):
    a, b = map(int, input().split())
    if a>= h and b >= w:
        n_splitable += 1

print(n_splitable)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
rects = [tuple(map(int, input().split())) for _ in range(N)]
count = 0
for rect in rects:
    if rect[0] >= H and rect[1] >= W:
        count += 1
print(count)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())


cnt=0
for i in range(n):
    a,b = map(int,input().split())
    if a>=h and b>=w:
        cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
N,H,W = map(int, input().split())
size = [input().split() for l in range(N)]
ans = 0
for i in range(N):
	if int(size[i][0]) >= H and int(size[i][1]) >= W:
		ans += 1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = list(map(int, input().split()))

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

cnt = 0
for a, b in sizels:
    if (a >= H) and (b >= W):
        # print(a, b, "OK")
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
Num = 0

for i in range(N):
	a, b = map(int, input().split())
	if a >= H and b >= W:
		Num += 1

print(Num)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
A,B = [],[]
for i in range(N):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)


ans = 0
for i in range(N):
    if A[i] >= H and B[i] >= W:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
#coding:utf-8

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

A = []
B = []
for i in range(N):
    A_i, B_i = list(map(int, input().split()))
    A.append(A_i)
    B.append(B_i)

count = 0
for i in range(N):
    if A[i] >= H and B[i] >= W:
        count += 1

print(count)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split(" "))
count = 0
for i in range(N):
    A,B = map(int,input().split(" "))
    if A>=H and B>=W:
        count += 1
print(count)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ret = 0
for _ in range(n):
    a, b = map(int, input().split())
    if a >= h and b >= w:
        ret += 1
print(ret)

Submission status: Accepted

Solution code:
N, H, W = tuple(map(int, input().split()))
cnt = 0
for _ in range(N):
    A, B = tuple(map(int, input().split()))
    if A >= H and B >= W:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N, H, W = [int(i) for i in input().strip().split()]
A = [0]*N
B = [0]*N
for i in range(N):
    A[i], B[i] = [int(j) for j in input().strip().split()]
num = 0
    
for i in range(N):
    if (A[i] >= H) and (B[i] >= W):
        num += 1
print(num)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
count = 0
for i in range(n):
  a, b = map(int, input().split())
  if a >= h and b >= w:
    count += 1
print(count)

Submission status: Accepted

Solution code:
def main():
    n, h, w = [int(s) for s in input().split()]
    c = 0

    for _ in range(n):
        a, b = [int(s) for s in input().split()]
        if a >= h and b >= w:
            c += 1

    print(c)


main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 15 22:14:32 2018

@author: doppe
"""
n, h, w = (int(x) for x in input().split())

count = 0
for i in range(0, n):
    y, x = (int(z) for z in input().split())
    if (y >= h and x >= w):
        count += 1

print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())

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

sum=0
for i in range(N):
    if L[i][0]>=H:
        if L[i][1]>=W:
            sum+=1

print(sum)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
count = 0

for i in range(n):
    a, b = map(int, input().split())
    if a >= h and b >= w:
        count += 1
        
print(count)

Submission status: Accepted

Solution code:
n,H,W=map(int,input().split())
p=0
for i in range(n):
  a,b=map(int,input().split())
  if a>=H and b>=W:
    p+=1
print(p)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
ab=[]
for i in range(n):
    ab.append(list(map(int,input().split())))
c=0
for j in ab:
    if j[0]>=h and j[1]>=w:
        c+=1
print(c)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
lst = []
for i in range(N):
    Ai, Bi = map(int, input().split())
    lst.append((Ai, Bi))

cnt = 0
for i in range(N):
    if lst[i][0] >= H and lst[i][1] >= W:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
[N,H,W]=[int(i) for i in input().split()]

count=0
for x in range(N):
	[A,B]=[int(j) for j in input().split()]

	if(H<=A and W<=B):
		count+=1

print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().strip().split())
A, B = [], []
for _ in range(N):
  a, b = map(int, input().strip().split())
  A.append(a)
  B.append(b)

i = 0
for a, b in zip(A, B):
  if a >= H and b >= W:
    i += 1
print(i)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
c = 0
a = []
for i in range(n):
 a = list(map(int,input().split()))
 if a[0] >= h and a[1] >= w:
  c += 1
print(c)

Submission status: Accepted

Solution code:
#encoding:utf-8

N,H,W = map(int, input().split())
A = []
B = []
for i in range(N):
    a,b = map(int, input().split())
    A.append(a)
    B.append(b)

count = 0
for i in range(N):
    if A[i] >= H and B[i] >= W:
        count += 1

print(count)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

cnt = 0
for i in ab:
	a, b = i[0], i[1]
	if (a >= h) and (b >= w):
		cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
cnt = 0
for _ in range(N):
    inp = input().split()
    A = int(inp[0])
    B = int(inp[1])
    if H <= A and W <= B:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())

ans = 0
for i in range(n):
    ai, bi = map(int, input().split())
    if ai >= h and bi >= w:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
alloy = [list(map(int,input().split())) for i in range(N)]

#print(alloy)

count = 0
for i in range(N):
  if alloy[i][0] >= H and alloy[i][1] >= W:
    count += 1
    continue
else:
  print(count)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ita = []
for _ in range(n):
    a, b = map(int, input().split())
    ita.append((a, b))

count = 0
for a, b in ita:
    if a >= h and b >= w:
        count += 1
print(count)

Submission status: Accepted

Solution code:
n, h, w = input().split()
n = int(n)
h = int(h)
w = int(w)
ans = 0

for _ in range(n):
    a, b = input().split()
    a = int(a)
    b = int(b)
    if a - h >= 0 and b - w >= 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
count=0
for _ in range(n):
    a,b=map(int,input().split())
    if h<=a and w<=b:
        count+=1

print(count)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
count=0
for i in range(n):
    a,b=map(int,input().split())
    if a-h>=0 and b-w>=0:
        count+=1
print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for _ in range(N):
    a, b = map(int, input().split())
    if a >= H and b >= W:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
#coding:utf-8

N, H, W = map(int, input().split())
count = 0
for n in range(N):
    a, b = map(int, input().split())
    if a >= H and b >= W:
        count += 1
print(count)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
lists = [list(map(lambda x:int(x),input().split())) for i in range(N)]
count = 0
for li in lists:
    if(li[0] >= H):
        if(li[1] >= W):
            count+=1
print(count)

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())
box=[]
for i in range(N):
    box.append(input().split())
count=0
for i in box:
    if(int(i[0])>=H and int(i[1])>=W):
        count+=1
print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for i in range(N):
    tmp = input().split()
    if int(tmp[0]) >= H and int(tmp[1]) >= W:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

A = [0] * N
B = [0] * N

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

output = 0
for i in range(N):
    if A[i] >= H and B[i] >= W:
        output += 1

print(output)

Submission status: Accepted

Solution code:
n,h,w = map(int, input().split() )

a = 0
b = 0
c = 0

for i in range(n) :
   a,b = map(int, input().split() )

   if (a>=h) and (b>=w) :
      c += 1

print(c)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
ab = [list(map(int, input().split())) for _ in range(n)]
c = 0
for i in range(n):
    if ab[i][0] >= h and ab[i][1] >= w:
        c += 1
print(c)

Submission status: Accepted

Solution code:
N, H, W = map(int,input().split())

n = 0
for _ in range(N):
    a, b = map(int,input().split())
    if a >= H and b >= W:
        n += 1
print(n)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())

ans = 0
for _ in range(N):
    A, B = map(int, input().split())
    if A >= H and B >= W:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = [int(i) for i in input().split()]

ans = 0
a =[]
b =[]

for i in range(N):
    a1, b1 = [int(i) for i in input().split()]
    a.append(a1)
    b.append(b1)

for i in range(N):
    if a[i] >= H and b[i] >= W:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split(" "))
base = [list(map(int, input().split(" "))) for _ in range(N)]
r = 0
for panel in base:
    if H <= panel[0] and W <= panel[1]:
        r += 1
print(r)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
count = 0
for i in range(n):
    a,b = map(int,input().split())
    if h <= a and w <= b:    
        count +=1
print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
A_B = [list(map(int, input().split())) for _ in range(N)]
count = 0

for a, b in A_B:
    if a >= H and b >= W:
        count += 1

print(count)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N,H,W =[int(_) for _ in input().split()]
iC = 0
for _ in range(N):
    a,b = [int(_) for _ in input().split()]
    if H<=a and W<=b:
        iC+=1
print(iC)

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())
A=[]
B=[]
for n in range(N):
    a,b=map(int,input().split())
    A.append(a)
    B.append(b)
count=0
for n in range(N):
    if H<=A[n] and W<=B[n]:
        count+=1
print(count)

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())
table=[[] for i in range(N)]
for i in range(N):
    a,b=map(int,input().split())
    table[i].append(a)
    table[i].append(b)
c=0
for i in range(N):
    if table[i][0]>=H and  table[i][1]>=W:
        c+=1
print(c)

Submission status: Accepted

Solution code:
N,H,W = map(int, input().split())
c=0
for _ in  range(N):
    try:
        listA=list(map(int,input().split()))
        A,B = listA[0], listA[1]
        
        if H <= A and W <= B:
            c+=1
    except:
        break;
print(c)

Submission status: Accepted

Solution code:
N, H, W = list(map(int, input().split()))
data = [list(map(int, input().split())) for _ in range(N)]

count = 0
for h, w in data:
    if H <= h and W <= w:
        count += 1

print(count)

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline


def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N, H, W] = [int(input_raw[0]),int(input_raw[1]),int(input_raw[2])]
    count = 0
    for i in range(N):
        input_raw = read_func().strip().split()
        [A, B] = [int(input_raw[0]),int(input_raw[1])]
        if A >= H and B >= W:
            count += 1

    print count


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
cnt = 0
for i in range(n):
  a, b = map(int, input().split())
  if a >= h and b >= w:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for i in range(N):
    A, B = map(int, input().split())
    ans += (1 if (A // H) * (B // W) > 0 else 0)
print(ans)

Submission status: Accepted

Solution code:
# from sys import stdout
from bisect import bisect_left as bs
from math import log as lg

log = lambda *x: print(*x)

def cin(*fn, def_fn=str):
	i,r = 0,[]
	if fn: def_fn=fn[0]
	for c in input().split(' '):
		r+=[(fn[i] if len(fn)>i else def_fn) (c)]
		i+=1
	return r

INF = 6<<20



n,w,h = cin(int)
a = []

c = 0
for i in range(n):
	a,b = cin(int)
	if a>=w and b>=h:
		c += 1

print(c)

Submission status: Accepted

Solution code:
N,H,W = input().split()

N=int(N)
H=int(H)
W=int(W)

count = 0
for i in range(N):
    a, b = input().split()
    a = int(a)
    b = int(b)

    ch = a // H
    cw = b // W

    count += min(ch,cw)
print(count)

Submission status: Accepted

Solution code:
n,h,w = map(int, input().split())
ans = 0
for i in range(n):
  a,b = map(int, input().split())
  if a >= h and b >= w:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
l=[list(map(int,input().split())) for i in range(n)]
cnt=0
for i in l:
    if i[0]>=h and i[1]>=w:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())

ans=0
for i in range(n):
  a,b=map(int,input().split())
  if(a>=h and b>=w):
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = [int(a) for a in input().strip().split()]
A = []
B = []
for i in range(0, N):
    ak, bk = [int(a) for a in input().strip().split()]
    A.append(ak)
    B.append(bk)

count = 0
for a, b in zip(A, B):
    if a >= H and b >= W:
        count = count + 1

print(count)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
ans = 0
for i in range(n):
    a,b = map(int,input().split())
    if a >= h and b >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:

n, h, w = map(int, input().split())

result = 0

for i in range(n):
    a, b = map(int, input().split())

    result = result + 1 if h <= a and w <= b else result

print(result)

Submission status: Accepted

Solution code:
N, H, W = list(map(int, input().split()))
count = 0
for i in range(N):
    Ai, Bi = list(map(int, input().split()))
    if Ai >= H and Bi >= W:
        count += 1
print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int,input().split())

cnt = 0
for i in range(N):
  A, B = map(int,input().split())
  if(A-H >= 0 and B-W >= 0):
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n,h,w = [int(i) for i in input().split()]
ans = 0
for i in range(n):
 a,b = [int(i) for i in input().split()]
 if a>=h and b>=w:
  ans+=1
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

N, H, W = map(int, input().split())
cnt = 0
for i in range(N):
    a, b = map(int, input().split())
    if a >= H and b >= W:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N,H,W=[int(x) for x in input().split()]
ans=0
for i in range(N):
    h,w = [int(x) for x in input().split()]
    ans += min(h//H, w//W)
print(ans)

Submission status: Accepted

Solution code:
n,h,w = map(int, input().split())

ans = 0

for _ in range(n):
    a,b = map(int, input().split())
    if h<=a and w<= b:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split(" "))
count=0
for i in range(N):
    A,B = map(int,input().split(" "))
    if A >= H and B >= W:
        count+=1
print(count)

Submission status: Accepted

Solution code:
(N,H,W) = map(int,input().split())
ans = 0
for i in range(N):
    (A,B) = map(int,input().split())
    if A >= H and B >= W:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

n, h, w= map(int, input().split())
count = 0
for i in range(n):
    a, b = map(int, input().split())
    aa = a // h
    bb = b // w
    if aa > 0 and bb > 0:
        count += min(aa, bb)

print(count)

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
d=0
for i in range(a):
    s,t=map(int,input().split())
    if s>=b and t>=c:
        d+=1
print(d)

Submission status: Accepted

Solution code:
N, H, W  = map(int, input().strip().split())

A = []
B = []
count = 0
for i in range(N):
    a,b= input().split()
    if int(a) >= H and int(b) >= W:
        count += 1


print(count)

Submission status: Accepted

Solution code:
n,h,w = map(int, input().split())
c = 0
for I in range(n):
 a,b = map(int,input().split())
 if a >= h and b >= w:
  c += 1
print(c)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
answer=0
for i in range(n):
    sh,sw=map(int,input().split())
    if sh >= h and sw >= w:
        answer+=1
print(answer)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ab = []
A = []
B = []
for i in range(N):
    ab.append(list(map(int, input().split())))
    A.append(ab[i][0])
    B.append(ab[i][1])

count = 0
for i in range(N):
    if H <= A[i] and W <= B[i]:
        count += 1
print(count)

Submission status: Accepted

Solution code:
N, K, W=map(int, input().split())
AB=[list(map(int, input().split())) for _ in range(N)]


ans=0
for i in range(len(AB)):
    if AB[i][0]>=K and AB[i][1]>=W:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
n,h,w = map(int, input().split())
ans = 0
for i in range(n):
    a,b = map(int, input().split())
    if a >= h and b >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = list(map(int, input().split()))
count = 0

for i in range(N):
    a, b = list(map(int, input().split()))

    if a >= H and b >= W:
        count += min([a // H, b // W])

print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]

counter = 0
for i in AB:
    if i[0] >= H and i[1] >= W:
        counter += 1

print(counter)

Submission status: Accepted

Solution code:
nhw = input().split(" ")
n = nhw[0]
h = nhw[1]
w = nhw[2]

cnt = 0
for i in range(int(n)):
  b = input().split(" ")
  hb = b[0]
  wb = b[1]
  if int(h) <= int(hb) and int(w) <= int(wb):
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
c = 0
for _ in [0]*n:
  a,b = map(int,input().split())
  if a>= h and b>=w:
    c += 1
print(c)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
ans=0
for i in range(n):
    hi,wi=map(int,input().split())
    if hi>=h and wi>=w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, raw_input().split())
count = 0

for i in range(N):
    A, B = map(int, raw_input().split())
    if A >= H and B >= W:
        count += 1

print(count)

Submission status: Accepted

Solution code:
n, h, w = list(map(int, input().split()))

count = 0
for i in range(n):
    a,b = list(map(int, input().split()))
    if ((a >= h) and (b >=w)):
        count += 1

print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for i in range(N):
    A, B = map(int, input().split())
    if A >= H and B >= W:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
cnt=0
for i in range(n):
    a,b=map(int,input().split())
    if a>=h and b>=w:
        cnt+=1
    a=0
    b=0
print(cnt)

Submission status: Accepted

Solution code:
N,M,W = map(int,input().split())
x=[0 for _ in range(N)]
y=[0 for _ in range(N)]
for i in range(N):
	x[i],y[i]=map(int,input().split())
ans=0
for i in range(N):
	if x[i] >= M and y[i] >= W:
		ans+=1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())

ans = 0

for i in range(N):
    a, b = map(int, input().split())
    if H<=a and W<=b:
        ans = ans+1
        
print(ans)

Submission status: Accepted

Solution code:
n,h,w = [int(i) for i in input().split()]
m = [[int(i) for i in input().split()] for j in range(n)]
cnt = 0
for i in range(n):
    if m[i][0] >= h and m[i][1] >= w:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
cnt = 0
for i in range(n):
    a, b = map(int, input().split())
    if a >= h and b >= w:
        cnt +=1

print(cnt)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
L = []
ans = 0
for i in range(N) :
    a,b = map(int,input().split())
    if (a >= H) and (b >= W) :
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,H,W=list(map(int,input().split()))
A=[]
B=[]
for i in range(N):
	a,b=list(map(int,input().split()))
	A.append(a)
	B.append(b)


c=0
for i in range(N):
	if A[i]>=H and B[i]>=W: c+=1

print(c)

Submission status: Accepted

Solution code:
N, H,W = map(int,input().split())
count = 0
for i in range(N):
    a,b = map(int,input().split())
    if a>= H and b >= W:
        count += 1
        
print(count)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
a = [tuple(map(int, input().split())) for _ in range(n)]
ans = 0
for i in range(n):
    if h <= a[i][0] and w <= a[i][1]:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    """Function."""
    n, h, w = map(int, input().split())

    count = 0
    for _ in range(n):
        a, b = map(int, input().split())
        if a >= h and b >= w:
            count += 1
    print(count)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:




if __name__ == '__main__':
    num, high, width = list(map(int, input().split()))
    ans = 0
    for i in range(num):
        data = list(map(int, input().split()))
        if data[0] >= high and data[1] >= width:
            ans += 1
    print(ans)

Submission status: Accepted

Solution code:
count = 0
N,H,W = map(int,input().split())
for i in range(N):
    a,b = map(int,input().split())
    if a-H >= 0 and b - W >= 0:
        count += 1
print(count)

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    N, H, W = map(int, input().split())
    AB = [tuple(map(int, input().split())) for _ in [0] * N]

    ans = 0
    for a, b in AB:
        ans += a >= H and b >= W
    print(ans)

input = lambda: stdin.readline()
main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N, W, H = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]

cnt = 0
for A,B in AB:
    if A >= W and B >= H:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
n, h, w = [int(i) for i in input().split()]
counter = 0
for i in range(n):
    a, b  = [int(i) for i in input().split()]
    if a >= h and b >= w:
        counter += 1
print(counter)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    n, h, w = map(int, input().split())
    ans = 0

    for i in range(n):
        ai, bi = map(int, input().split())
        ans += min(ai // h, bi // w)

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline
n, h, w = map(int, input().split())
cnt = 0
for _ in range(n):
    a, b = map(int, input().split())
    if a >= h and b >= w:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
su = 0
for i in range(a[0]):
	w,h = map(int,input().split())
	if w >= a[1] and h >= a[2]:
		su += 1

print(su)

Submission status: Accepted

Solution code:
n, w, h = map(int, raw_input().split())
a, b = [], []
for i in xrange(n):
	x, y = map(int, raw_input().split())
	a.append(x)
	b.append(y)
ans = 0
for i in xrange(n):
	if a[i] >= w and b[i] >= h:
		ans += 1
print ans