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>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long long INF = (1 << 30) - 1;
const long long LLINF = (1LL << 60LL);
const long long MOD = 1000000007;
const long long mod = 998244353;
const long long MAX = 1100000;
const double pi = acos(-1);
const double eps = 1e-10;
long long dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
struct Timer {
  chrono::system_clock::time_point start, end;
  Timer() { start = chrono::system_clock::now(); }
  ~Timer() {
    end = chrono::system_clock::now();
    auto msec =
        chrono::duration_cast<chrono::milliseconds>(end - start).count();
    cerr << "time : " << msec << " ms" << endl;
  }
};
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Timer TM;
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  long long a[200010], b[200010];
  long long cnt[10] = {};
  for (long long i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    if (a[i] < sx) {
      cnt[4]++;
    }
    if (sx < a[i]) {
      cnt[2]++;
    }
    if (sy > b[i]) {
      cnt[1]++;
    }
    if (sy < b[i]) {
      cnt[3]++;
    }
  }
  long long ans = -LLINF;
  for (long long i = 1; i < 5; i++) {
    chmax(ans, cnt[i]);
  }
  cout << ans << endl;
  if (cnt[1] == ans) {
    cout << sx << " " << sy - 1 << endl;
  } else if (cnt[2] == ans) {
    cout << sx + 1 << " " << sy << endl;
  } else if (cnt[3] == ans) {
    cout << sx << " " << sy + 1 << endl;
  } else if (cnt[4] == ans) {
    cout << sx - 1 << " " << sy << endl;
  }
  return 0;
}
