#line 1 "main.cpp"

/**
 * @title Template
 */

#include <iostream>
#include <algorithm>
#include <utility>
#include <numeric>
#include <vector>
#include <array>
#include <cassert>
#include <map>

#line 2 "/Users/kodamankod/Desktop/Programming/Library/other/chmin_chmax.cpp"

template <class T, class U>
constexpr bool chmin(T &lhs, const U &rhs) {
  if (lhs > rhs) { lhs = rhs; return true; }
  return false;
}

template <class T, class U>
constexpr bool chmax(T &lhs, const U &rhs) {
  if (lhs < rhs) { lhs = rhs; return true; }
  return false;
}

/**
 * @title Chmin/Chmax
 */
#line 2 "/Users/kodamankod/Desktop/Programming/Library/other/range.cpp"

#line 4 "/Users/kodamankod/Desktop/Programming/Library/other/range.cpp"

class range {
public:
  class iterator {
  private:
    int64_t M_position;

  public:
    constexpr iterator(int64_t position) noexcept: M_position(position) { }
    constexpr void operator ++ () noexcept { ++M_position; }
    constexpr bool operator != (iterator other) const noexcept { return M_position != other.M_position; }
    constexpr int64_t operator * () const noexcept { return M_position; }

  };

  class reverse_iterator {
  private:
    int64_t M_position;
  
  public:
    constexpr reverse_iterator(int64_t position) noexcept: M_position(position) { }
    constexpr void operator ++ () noexcept { --M_position; }
    constexpr bool operator != (reverse_iterator other) const noexcept { return M_position != other.M_position; }
    constexpr int64_t operator * () const noexcept { return M_position; }

  };
  
private:
  const iterator M_first, M_last;

public:
  constexpr range(int64_t first, int64_t last) noexcept: M_first(first), M_last(std::max(first, last)) { }
  constexpr iterator begin() const noexcept { return M_first; }
  constexpr iterator end() const noexcept { return M_last; }
  constexpr reverse_iterator rbegin() const noexcept { return reverse_iterator(*M_last - 1); } 
  constexpr reverse_iterator rend() const noexcept { return reverse_iterator(*M_first - 1); } 

};

/**
 * @title Range
 */
#line 2 "/Users/kodamankod/Desktop/Programming/Library/other/rev.cpp"

#include <type_traits>
#include <iterator>
#line 6 "/Users/kodamankod/Desktop/Programming/Library/other/rev.cpp"

template <class T>
class rev_impl {
public:
  using iterator = decltype(std::rbegin(std::declval<T>()));

private:
  const iterator M_begin;
  const iterator M_end;

public:
  constexpr rev_impl(T &&cont) noexcept: M_begin(std::rbegin(cont)), M_end(std::rend(cont)) { }
  constexpr iterator begin() const noexcept { return M_begin; }
  constexpr iterator end() const noexcept { return M_end; }

};

template <class T>
constexpr decltype(auto) rev(T &&cont) {
  return rev_impl<T>(std::forward<T>(cont));
}

/**
 * @title Reverser
 */
#line 2 "/Users/kodamankod/Desktop/Programming/Library/other/fix_point.cpp"

#line 4 "/Users/kodamankod/Desktop/Programming/Library/other/fix_point.cpp"

template <class Func>
struct fix_point_impl: private Func {
  explicit constexpr fix_point_impl(Func &&func): Func(std::forward<Func>(func)) { }
  template <class... Args>
  constexpr decltype(auto) operator () (Args &&... args) const {
    return Func::operator()(*this, std::forward<Args>(args)...);
  }
};

template <class Func>
constexpr decltype(auto) fix_point(Func &&func) {
  return fix_point_impl<Func>(std::forward<Func>(func));
}

/**
 * @title Lambda Recursion
 */
#line 2 "/Users/kodamankod/Desktop/Programming/Library/graph/network.cpp"

#include <cstddef>
#include <cstdint>
#line 8 "/Users/kodamankod/Desktop/Programming/Library/graph/network.cpp"
#include <type_traits>

template <class Edge>
class network {
public:
  using vertex_type = typename Edge::vertex_type;
  using edge_type   = Edge;
  using size_type   = size_t;

  class index_helper {
  private:
    const size_type M_stuff, M_size;
  public:
    explicit index_helper(const size_type stuff, const size_type size): 
      M_stuff(stuff), M_size(size) 
    { }
    vertex_type operator [] (const size_type index) const {
      return to_vertex(index);
    }
    vertex_type to_vertex(const size_type index) const {
      return index + M_stuff;
    }
    size_type to_index(const vertex_type vert) const {
      return vert - M_stuff;
    }
    size_type size() const {
      return M_size;
    }
  };

protected:
  std::vector<std::vector<edge_type>> M_graph;

public:
  network() = default;

  template <bool ReturnsIndex = true>
  typename std::enable_if<ReturnsIndex, vertex_type>::type add_vertex() {
    vertex_type res = M_graph.size();
    M_graph.push_back({ });
    return res;
  }
  template <bool ReturnsIndex = true>
  typename std::enable_if<!ReturnsIndex, void>::type add_vertex() {
    M_graph.push_back({ });
  }

  template <bool ReturnsIndices = true>
  typename std::enable_if<ReturnsIndices, index_helper>::type 
  add_vertices(const size_type size) {
    size_type cur = M_graph.size();
    M_graph.resize(cur + size);
    return index_helper(cur, size);
  }
  template <bool ReturnsIndices = true>
  typename std::enable_if<!ReturnsIndices, void>::type 
  add_vertices(const size_type size) {
    size_type cur = M_graph.size();
    M_graph.resize(cur + size);
  }
  
  void add_edge(const edge_type &edge) {
    M_graph[edge.source].push_back(edge);
  }
  template <class... Args>
  void emplace_edge(const vertex_type src, Args&&... args) {
    M_graph[src].emplace_back(src, std::forward<Args>(args)...);
  }

  std::vector<edge_type> &operator [] (const vertex_type vert) {
    return M_graph[vert];
  }
  const std::vector<edge_type> &operator [] (const vertex_type vert) const {
    return M_graph[vert];
  }

  size_type size() const {
    return M_graph.size();
  }
  bool empty() const {
    return M_graph.empty();
  }
  void clear() {
    M_graph.clear();
    M_graph.shrink_to_fit();
  }

};

class base_edge {
public:
  using vertex_type = uint32_t;
  const vertex_type source, dest;
  explicit base_edge(const vertex_type source, const vertex_type dest): 
    source(source), dest(dest) 
  { }
  base_edge reverse() {
    return base_edge(dest, source);
  }
};

template <class Flow>
class flow_edge: public base_edge {
public:
  using vertex_type = typename base_edge::vertex_type;
  using flow_type   = Flow;
  flow_type flow;
  const flow_type capacity;
  explicit flow_edge(const base_edge &edge, const flow_type capacity):
    base_edge(edge), flow(0), capacity(capacity)
  { }
  explicit flow_edge(const base_edge &edge, const flow_type flow, const flow_type capacity):
    base_edge(edge), flow(flow), capacity(capacity)
  { }
  explicit flow_edge(const vertex_type source, const vertex_type dest, const flow_type capacity):
    base_edge(source, dest), flow(0), capacity(capacity)
  { }
  explicit flow_edge(const vertex_type source, const vertex_type dest, const flow_type flow, const flow_type capacity):
    base_edge(source, dest), flow(flow), capacity(capacity)
  { }
  flow_edge reverse() const {
    return flow_edge(static_cast<base_edge>(*this).reverse(), capacity - flow, capacity);
  }
};

template <class Flow, class Cost>
class flow_cost_edge: public flow_edge<Flow> {
public:
  using vertex_type = typename flow_edge<Flow>::vertex_type;
  using flow_type   = typename flow_edge<Flow>::flow_type;
  using cost_type   = Cost;
  const cost_type cost;
  explicit flow_cost_edge(const flow_edge<Flow> &edge, const cost_type cost):
    flow_edge<Flow>(edge), cost(cost)
  { }
  explicit flow_cost_edge(const vertex_type source, const vertex_type dest, const flow_type capacity, const cost_type cost):
    flow_edge<Flow>(source, dest, capacity), cost(cost)
  { }
  explicit flow_cost_edge(const vertex_type source, const vertex_type dest, const flow_type flow, const flow_type capacity, const cost_type cost):
    flow_edge<Flow>(source, dest, flow, capacity), cost(cost)
  { }
  flow_cost_edge reverse() const {
    return flow_cost_edge(static_cast<flow_edge<Flow>>(*this).reverse(), -cost);
  }
};

/**
 * @title Network
 */
#line 20 "main.cpp"

using i32 = int32_t;
using i64 = int64_t;
using u32 = uint32_t;
using u64 = uint64_t;

constexpr i32 inf32 = (i32(1) << 30) - 1;
constexpr i64 inf64 = (i64(1) << 62) - 1;

int main() {
  i32 N;
  std::cin >> N;
  i32 S1, S2;
  std::cin >> S1 >> S2;
  --S1; --S2;
  std::vector<std::pair<i32, i32>> P(N);
  for (auto &[x, y]: P) {
    i32 a, b;
    std::cin >> a >> b;
    x = a + b;
    y = a - b;
  }
  const i32 dist = std::max(std::abs(P[S1].first - P[S2].first), std::abs(P[S1].second - P[S2].second));
  network<base_edge> graph;
  graph.add_vertices<false>(N);
  std::vector<i32> add(N);
  const auto expand = [&] {
    std::vector<i32> ord(N);
    std::iota(ord.begin(), ord.end(), 0);
    std::sort(ord.begin(), ord.end(), [&](auto i, auto j) {
      if (P[i].first == P[j].first) return P[i].second < P[j].second;
      return P[i].first < P[j].first;
    });
    std::map<i32, std::vector<std::pair<i32, i32>>> map;
    const auto vert = graph.add_vertices(2 * N);
    for (auto i: range(1, N)) {
      graph.emplace_edge(vert[i], vert[i << 1 | 0]);
      graph.emplace_edge(vert[i], vert[i << 1 | 1]);
    }
    for (auto i: range(0, N)) {
      graph.emplace_edge(ord[i], vert[i + N]);
      graph.emplace_edge(vert[i + N], ord[i]);
      map[P[ord[i]].first].emplace_back(P[ord[i]].second, i);
    }
    const auto range_edges = [&](const auto from, auto first, auto last) {
      if (first >= last) {
        return;
      }
      add[ord[from - N]] += last - first;
      while (first < last) {
        if (first & 1) {
          graph.emplace_edge(vert[from], vert[first]);
          ++first;
        }
        if (last & 1) {
          --last;
          graph.emplace_edge(vert[from], vert[last]);
        }
        first >>= 1;
        last >>= 1;
      }
    };
    for (auto k: range(0, N)) {
      const auto i = ord[k];
      const auto itr = map.find(P[i].first - dist);
      if (itr == map.end()) {
        continue;
      }
      const auto &vec = itr -> second;
      const auto first = std::lower_bound(vec.begin(), vec.end(), std::make_pair(P[i].second - dist, 0));
      const auto last = std::lower_bound(vec.begin(), vec.end(), std::make_pair(P[i].second + dist, 0));
      if (first == vec.end() || last == vec.begin()) {
        continue;
      }
      range_edges(k + N, first -> second + N, std::prev(last) -> second + N + 1);
    }
    for (auto k: range(0, N)) {
      const auto i = ord[k];
      const auto itr = map.find(P[i].first + dist);
      if (itr == map.end()) {
        continue;
      }
      const auto &vec = itr -> second;
      const auto first = std::lower_bound(vec.begin(), vec.end(), std::make_pair(P[i].second - dist + 1, 0));
      const auto last = std::lower_bound(vec.begin(), vec.end(), std::make_pair(P[i].second + dist + 1, 0));
      if (first == vec.end() || last == vec.begin()) {
        continue;
      }
      range_edges(k + N, first -> second + N, std::prev(last) -> second + N + 1);
    }
  };
  expand();
  for (auto &[x, y]: P) {
    const auto a = x, b = y;
    x = -b;
    y = a;
  }
  expand();
  std::vector<bool> done(graph.size());
  fix_point([&](auto dfs, i32 u) -> void {
    if (done[u]) {
      return;
    }
    done[u] = true;
    for (auto e: graph[u]) {
      dfs(e.dest);
    }
  })(S1);
  i64 ans = 0;
  for (auto i: range(0, N)) {
    if (done[i]) {
      ans += add[i];
    }
  }
  std::cout << ans / 2 << '\n';
  return 0;
}


Measured memory_bytes: 65120