program manhattan_compass
  implicit none
  integer :: n, a, b, p(100001,3) = 0, length, tmp1, tmp2, i, cnt = 0
  integer :: s(100000) = 0, pre(1000000) = 0, nxt(1000000) = 0, h(100000) = 0
  logical :: vis(100000) = .false.
  integer(8) :: ans = 0_8
  read(*,*) n, a, b
  do i = 1, n
    read(*,*) tmp1, tmp2
    p(i,:) = (/tmp1+tmp2,tmp1-tmp2,i/)
  end do
  length = max(abs(p(a,1)-p(b,1)),abs(p(a,2)-p(b,2)))
  call solve(length)
  do i = 1, n
    call swap(p(i,1),p(i,2))
  end do
  call solve(length-1)
  call dfs(a)
  write(*,'(i0)') ans
contains
  subroutine swap(a,b)
    integer, intent(inout) :: a, b
    a = xor(a,b)
    b = xor(a,b)
    a = xor(a,b)
  end
  subroutine solve(d)
    integer, intent(in) :: d
    integer :: l, r, k, i
    call merge_sort(p(1:n,1:3))
    l = 1
    r = 0
    k = 1
    do i = 1, n
      do while (l < n .and. (p(l,1) < p(i,1)-length .or. &
      & (p(l,1) == p(i,1)-length .and. p(l,2) < p(i,2)-d)))
        l = l+1
      end do
      do while (r < n .and. (p(r+1,1) < p(i,1)-length .or. &
      & (p(r+1,1) == p(i,1)-length .and. p(r+1,2) <= p(i,2)+d)))
        r = r+1
      end do
      s(p(i,3)) = s(p(i,3))+r-l+1
      k = max(k,l)
      do while (k <= r)
        call add(p(i,3),p(k,3))
        k = k+1
      end do
      k = k-1
    end do
  end
  subroutine add(x,y)
    integer, intent(in) :: x, y
    cnt = cnt+1
    pre(cnt) = y
    nxt(cnt) = h(x)
    h(x) = cnt
    cnt = cnt+1
    pre(cnt) = x
    nxt(cnt) = h(y)
    h(y) = cnt
  end
  recursive subroutine dfs(x)
    integer, intent(in) :: x
    integer :: i
    vis(x) = .true.
    ans = ans+int(s(x),8)
    i = h(x)
    do while (i /= 0)
      if (.not.vis(pre(i))) call dfs(pre(i))
      i = nxt(i)
    end do
  end
  subroutine merge_sort(a)
    integer, intent(inout) :: a(:,:)
    integer :: n, m, l, i, u
    n = size(a,1)
    m = n
    l = 1
    do while (m > 1)
      do i = 1, m/2
        u = min(2*i*l,n)
        call merger(a(2*(i-1)*l+1:(2*i-1)*l,:),a((2*i-1)*l+1:u,:))
      end do
      l = 2*l
      m = (m+1)/2
    end do
  end
  subroutine merger(a1,a2)
    integer, intent(inout) :: a1(:,:), a2(:,:)
    integer :: a(size(a1,1)+size(a2,1),size(a1,2))
    integer :: i1, i2, n1, n2
    i1 = 1
    i2 = 1
    n1 = size(a1,1)
    n2 = size(a2,1)
    do while (i1 <= n1 .and. i2 <= n2)
      if (a1(i1,1) < a2(i2,1) .or. &
      & (a1(i1,1) == a2(i2,1) .and. a1(i1,2) < a2(i2,2))) then
        a(i1+i2-1,:) = a1(i1,:)
        i1 = i1+1
      else
        a(i1+i2-1,:) = a2(i2,:)
        i2 = i2+1
       end if
    end do
    if (i1 <= n1) then
      a(i1+i2-1:n1+n2,:) = a1(i1:n1,:)
    else
      a(i1+i2-1:n1+n2,:) = a2(i2:n2,:)
    end if
    a1 = a(1:n1,:)
    a2 = a(n1+1:n1+n2,:)
  end
end program manhattan_compass