1 1000000000 7
1000000000 9
 3 2 2
2 4
2 1
3 6
 2 1000000000 100000
1000000000 1000000
1000000000 10000
 1 100 100
50 70
 1 100 100
101 100

1
1000000000 8 2
2 3 1
1000000000 100001 1
99 100 1
101 100
#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
signed main() {
  ios_base::sync_with_stdio(0);
  long long TESTS = 1;
  while (TESTS--) {
    long long n, sx, sy;
    cin >> n >> sx >> sy;
    pair<long long, long long> p[n];
    for (long long i = 0; i < n; i++) {
      long long x, y;
      cin >> x >> y;
      p[i] = {x, y};
    }
    long long mx = 0;
    pair<long long, long long> best;
    {
      long long cnt = 0;
      for (long long i = 0; i < n; i++) {
        if (p[i].first < sx) cnt++;
      }
      if (cnt > mx) {
        mx = cnt;
        best = {sx - 1, sy};
      }
    }
    {
      long long cnt = 0;
      for (long long i = 0; i < n; i++) {
        if (p[i].second < sy) cnt++;
      }
      if (cnt > mx) {
        mx = cnt;
        best = {sx, sy - 1};
      }
    }
    {
      long long cnt = 0;
      for (long long i = 0; i < n; i++) {
        if (p[i].second > sy) cnt++;
      }
      if (cnt > mx) {
        mx = cnt;
        best = {sx, sy + 1};
      }
    }
    {
      long long cnt = 0;
      for (long long i = 0; i < n; i++) {
        if (p[i].first > sx) cnt++;
      }
      if (cnt > mx) {
        mx = cnt;
        best = {sx + 1, sy};
      }
    }
    cout << mx << '\n' << best.first << " " << best.second;
  }
}
