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;
const int LIM = 1e5 + 5, MOD = 1e9 + 7;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long fastpowMOD(long long a, long long p, long long MOD) {
  if (p == 0) return 1;
  long long z = fastpowMOD(a, p / 2, MOD);
  z = (z * z) % MOD;
  if (p % 2) z = (z * a) % MOD;
  return z;
}
bool seive[100005];
void SieveOfEratosthenes(long long n) {
  memset(seive, true, sizeof(seive));
  for (long long p = 2; p * p <= n; p++)
    if (seive[p] == true)
      for (long long i = p * p; i <= n; i += p) seive[i] = false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long sx, sy;
  cin >> sx >> sy;
  long long right = 0, left = 0, top = 0, bottom = 0, i;
  long long rx = 1e9, ry = 1e9, lx = -1e9, ly = -1e9, tx = 1e9, ty = 1e9,
            bx = -1e9, byy = -1e9;
  for (i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    x = x - sx;
    y = y - sy;
    if (x < 0) {
      left++;
      if (x > lx) {
        ly = y;
      }
      lx = max(x, lx);
    }
    if (x > 0) {
      right++;
      if (x < rx) {
        ry = y;
      }
      rx = min(x, rx);
    }
    if (y > 0) {
      top++;
      if (y < ty) {
        tx = x;
        ty = min(y, ty);
      }
    } else {
      bottom++;
      if (y > byy) {
        bx = x;
        byy = max(y, byy);
      }
    }
  }
  long long max1;
  max1 = max(max(top, bottom), max(left, right));
  cout << max1;
  cout << "\n";
  if (max1 == top) {
    cout << sx << " " << ty + sy;
  } else if (max1 == bottom) {
    cout << sx << " " << byy + sy;
  } else if (max1 == left) {
    cout << lx + sx << " " << sy;
  } else {
    cout << rx + sx << " " << sy;
  }
}
