#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
long long xx[200005], yy[200005];
vector<long long> vc, temp;
void calDis(long long sx, long long sy, long long num) {
  for (long long i = 0; i < num; ++i) {
    long long x = abs(sx - xx[i]);
    long long y = abs(sy - yy[i]);
    vc.push_back(x + y);
  }
}
void tempCalDis(long long sx, long long sy, long long num) {
  temp.clear();
  for (long long i = 0; i < num; ++i) {
    long long x = abs(sx - xx[i]);
    long long y = abs(sy - yy[i]);
    temp.push_back(x + y);
  }
}
int main() {
  long long n, m, tc, num, t = 1;
  long long sx, sy;
  scanf("%lld", &num);
  scanf("%lld %lld", &sx, &sy);
  for (long long i = 0; i < num; ++i) {
    scanf("%lld %lld", &xx[i], &yy[i]);
  }
  calDis(sx, sy, num);
  long long cnt = 0, ans = 0, ax, ay;
  tempCalDis(sx, sy + 1, num);
  cnt = 0;
  for (long long i = 0; i < temp.size(); ++i) {
    if (temp[i] <= vc[i]) cnt++;
  }
  if (cnt > ans) {
    ax = sx;
    ay = sy + 1;
    ans = cnt;
  }
  tempCalDis(sx, sy - 1, num);
  cnt = 0;
  for (long long i = 0; i < temp.size(); ++i) {
    if (temp[i] <= vc[i]) cnt++;
  }
  if (cnt > ans) {
    ax = sx;
    ay = sy - 1;
    ans = cnt;
  }
  tempCalDis(sx + 1, sy, num);
  cnt = 0;
  for (long long i = 0; i < temp.size(); ++i) {
    if (temp[i] <= vc[i]) cnt++;
  }
  if (cnt > ans) {
    ax = sx + 1;
    ay = sy;
    ans = cnt;
  }
  tempCalDis(sx - 1, sy, num);
  cnt = 0;
  for (long long i = 0; i < temp.size(); ++i) {
    if (temp[i] <= vc[i]) cnt++;
  }
  if (cnt > ans) {
    ax = sx - 1;
    ay = sy;
    ans = cnt;
  }
  cout << ans << endl;
  cout << ax << " " << ay << endl;
}
