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;
#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;
}
