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

ans=0

for i in range(n):

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

  if a>=h and b>=w:

    ans+=1

print(ans)

import sys

readline = sys.stdin.readline



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

ans = 0

for i in range(N):

  a,b = list(map(int,readline().split()))

  if a >= H and b >= W:

    ans += 1

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

import sys

readline = sys.stdin.readline
N, H, W = list(map(int, readline().split()))
ans = 0
for i in range(N):
    a, b = list(map(int, readline().split()))
    if a >= H and b >= W:
        ans += 1
print(ans)

-n, h, w = list(map(int, input().split())) +import sys + +readline = sys.stdin.readline +N, H, W = list(map(int, readline().split())) -for i in range(n): -    a, b = list(map(int, input().split())) -    if a >= h and b >= w: +for i in range(N): +    a, b = list(map(int, readline().split())) +    if a >= H and b >= W: