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;
void solve() {
  long long i, j = 0, r = 200, p, q, k, d, y = 0, h, flag = 0, m = 0, n,
               a = 1000000007, b = 1000000007, id, h1, h2, a1, b1, a2, w, x, u,
               f, l, c, e, ans = 0;
  string s, s1;
  cin >> n >> x >> y;
  vector<pair<long long, long long> > vp(n);
  long long ux = 0, uy = 0, dx = 0, dy = 0;
  for (i = 0; i < n; i++) {
    cin >> vp[i].first >> vp[i].second;
    if (vp[i].first > x)
      ux++;
    else if (vp[i].first < x)
      dx++;
    if (vp[i].second > y)
      uy++;
    else if (vp[i].second < y)
      dy++;
  }
  m = max({ux, uy, dx, dy});
  if (m == ux)
    cout << m << endl << x + 1 << " " << y;
  else if (m == uy)
    cout << m << endl << x << " " << y + 1;
  else if (m == dx)
    cout << m << endl << x - 1 << " " << y;
  else
    cout << m << endl << x << " " << y - 1;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
}
