program atcoder_alloy
  implicit none
  integer :: n, h, w, a, b, m, i
  read(*,*) n, h, w
  m = 0
  do i = 1, n
    read(*,*) a, b
    if (a.ge.h.and.b.ge.w) m = m + 1
  end do
  write(*,'(i0)') m
  stop
end program atcoder_alloy