#include <bits/stdc++.h>
using namespace std;
const long long homu = 2e5;
long long x[homu], y[homu];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, i, j, k, l, m, X, Y;
  cin >> n >> X >> Y;
  long long one = 0, two = 0, three = 0, four = 0, onetwo = 0, twothree = 0,
            threefour = 0, fourone = 0;
  for (i = 1; i <= n; ++i) {
    cin >> x[i] >> y[i];
    if (x[i] > X && y[i] > Y) {
      one++;
    } else if (x[i] == X && y[i] > Y) {
      onetwo++;
    } else if (x[i] < X && y[i] > Y) {
      two++;
    } else if (x[i] < X && y[i] == Y) {
      twothree++;
    } else if (x[i] < X && y[i] < Y) {
      three++;
    } else if (x[i] == X && y[i] < Y) {
      threefour++;
    } else if (x[i] > X && y[i] < Y) {
      four++;
    } else if (x[i] > X && y[i] == Y) {
      fourone++;
    }
  }
  long long xet1, xet2, xet3, xet4;
  xet1 = one + onetwo + two;
  xet2 = two + twothree + three;
  xet3 = three + threefour + four;
  xet4 = four + fourone + one;
  long long ans1 = -1;
  long long ans2 = 0;
  ans1 = max(xet1, xet2);
  ans1 = max(ans1, xet3);
  ans1 = max(ans1, xet4);
  cout << ans1 << '\n';
  if (ans1 == xet1) {
    cout << X << ' ' << Y + 1;
    return 0;
  } else if (ans1 == xet2) {
    cout << X - 1 << ' ' << Y;
    return 0;
  } else if (ans1 == xet3) {
    cout << X << ' ' << Y - 1;
    return 0;
  } else {
    cout << X + 1 << ' ' << Y;
    return 0;
  }
  cout << '\n' << ans1;
}
