program main
implicit None
	integer(8)::n,h,w,i,c
	integer(8),allocatable::a(:),b(:)
	
	read *,n,h,w
	allocate(a(n),b(n))
	
	do i = 1,n
		read *,a(i),b(i)
	enddo
	
	c = 0
	
	do i = 1,n
		if(a(i) >= h .and. b(i)>= w) c = c + 1
	enddo
	
	print 101,c
101 format(i0)
end program main