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;
using ll = long long;
using P = pair<ll, ll>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecVec = vector<Vec>;
template <typename T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const ll INF = 1e9 + 1;
const ll LINF = 1e18 + 1;
const ll MOD = 1e9 + 7;
const double PI = acos(-1);
const double EPS = 1e-9;
int main(void) {
  ll n;
  P s;
  cin >> n >> s.first >> s.second;
  VecP p(n);
  for (ll(i) = (0); (i) < (n); ++(i)) cin >> p[i].first >> p[i].second;
  ll u = 0, d = 0, l = 0, r = 0;
  for (ll(i) = (0); (i) < (n); ++(i)) {
    if (p[i].first > s.first) u++;
    if (p[i].first < s.first) d++;
    if (p[i].second < s.second) l++;
    if (p[i].second > s.second) r++;
  }
  ll m = max(max(u, d), max(l, r));
  cout << (m) << endl;
  if (u == m) {
    cout << (s.first + 1) << ' ';
    cout << (s.second) << endl;
  } else if (d == m) {
    cout << (s.first - 1) << ' ';
    cout << (s.second) << endl;
  } else if (l == m) {
    cout << (s.first) << ' ';
    cout << (s.second - 1) << endl;
  } else if (r == m) {
    cout << (s.first) << ' ';
    cout << (s.second + 1) << endl;
  }
  return 0;
}
