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

Solution (Python):

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)

Solution (Python):
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)

Solution (Python):



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()

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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

Solution (Python):

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 += 1
print(ans)

Solution (Python):
n, h, w = map(int, input().split())
c = []
for i in range(n):
    c.append([int(m) for m in input().split()])

ans = 0
for i in range(n):
    if c[i][0] >= h and c[i][1] >= w:
        ans += 1
print(ans)

Solution (Python):
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)

Solution (Python):
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 = ans +1
print(ans)

Solution (Python):
from statistics import mean, median,variance,stdev
import sys
import math
import fractions
def j(a):
    if a: print("AC")
    else :print("WA")


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())



x,y,z = (int(i) for i in input().split())    






num=0
for d in range(x):
    a,b = (int(i) for i in input().split())
    if a>=y and b>=z:
        num+=1
print(num)

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

print(ans)

Solution (Python):
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 += 1

print(ans)

Solution (Python):
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)

Solution (Python):
[n,h,w] = [int(i) for i in input().split()]
a = {}
for i in range(n):
    a[i] = [int(i) for i in input().split()]
cnt = 0
for i in a.values():
    if i[0] >= h and i[1] >= w:
        cnt += 1
print(cnt)

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

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

print(count)

Solution (Python):
n,h,w=map(int,input().split())
ans=chk=0
for i in range(n):
    y,x=map(int,input().split())
    if h<=y and w<=x: ans+=1
print(ans)

Solution (Python):
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)

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

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

Solution (Python):
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 += 1

print(ans)

Solution (Python):
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)

Solution (Python):
N,H,W = map(int,input().split())
L = [list(map(int,input().split())) for _ in range(N)]
ans = 0

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

print(ans)

Solution (Python):
N, H, W = map(int, input().split())
ans = 0

for i in range(N):
    h, w = map(int, input().split())
    if h >= H and w >= W:
        ans += 1

print(ans)

Solution (Python):
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)

Solution (Python):
def caddi2018b_b():
    n, h, w = map(int, input().split())
    boards = [list(map(int, input().split())) for _ in range(n)]
    ans = 0

    for i in range(n):
        if boards[i][0] >= h and boards[i][1]>=w:
            ans += 1
    print(ans)


caddi2018b_b()

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

count=0
for i in range(N):
  A,B=map(int,input().split())
  if H>A or W>B:
    continue;
  count+=1
  
print(count)

Solution (Python):
class Rect:
    def __init__(self, a, b):
        self.a = a
        self.b = b


N, H, W = map(int, input().split())
rects = []
for _ in range(N):
    a, b = map(int, input().split())
    rects.append(Rect(a, b))


cnt = 0
for rect in rects:
    if rect.a >= H and rect.b >= W:
        cnt += 1
print(cnt)

Solution (Python):



 
import sys
import math



 

fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile


mod=1000000007
 

def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 

t=1
for tt in range(t):
	
    
    n,h,w= map(int, sys.stdin.readline().split(' '))
    ans=0
    for i in range(n):
    	a,b= map(int, sys.stdin.readline().split(' '))
    	if(a>=h and b>=w):
    		ans+=1
    print(ans)

    
    

if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

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

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

print(res)

Solution (Python):

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

ans = 0
for Ai, Bi in AB:
    if H <= Ai and W <= Bi: ans += 1

print(ans)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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) & (b>=W):
        cnt += 1
print(cnt)

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

Solution (Python):
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)

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

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

ans = 0
for a, b in AB:
    if a >= H and b >= W:
        ans += 1

print(ans)

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

Solution (Python):
n, h, w = [int(_) for _ in input().split()]

a = []
b = []
for i in range(n):
    ai, bi = [int(_) for _ in input().split()]
    a.append(ai)
    b.append(bi)

counter = 0
for i in range(n):
    if a[i] >= h and b[i] >= w:
        counter += 1
print(counter)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
n, h, w = map(int, input().split())
a_list = []
b_list = []

for i in range(n):
    a, b = map(int, input().split())
    a_list.append(a)
    b_list.append(b)
count = 0
for i in range(n):
    a = a_list[i]
    b = b_list[i]

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

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

Solution (Python):
N, H, W = [int(x) for x in input().split()]
ans = 0
for _ in range(N):
    a, b = [int(x) for x in input().split()]
    ans += H <= a and W <= b
print(ans)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

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

res = 0
for i in range(N):
    A, B = (int(i) for i in input().split())
    if H <= A and W <= B:
        res += 1

print(res)

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

a = [i for i in range(n)]
b = [i for i in range(n)]

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

ans = 0

for i in range(n):
    if a[i] >= h and b[i] >= w:
        ans += 1


print(ans)

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

Solution (Python):
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 += 1

print(ans)

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

Solution (Python):


import sys
from collections import Counter


input = sys.stdin.readline
INF = float('inf')
MOD = 10 ** 9 + 7


def inpl(): return list(map(int, input().split()))


N, H, W = inpl()

ans = 0
for _ in range(N):
    a, b = inpl()
    if a >= H and b >= W:
        ans += 1

print(ans)

Solution (Python):
N, H, W = map(int, input().split())
res = 0

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

print(res)

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

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

    ans += int(a >= h and b >= w)

print(ans)

Solution (Python):
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)

Solution (Python):
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 += 1

print(ans)