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;
int main() {
  int ar[4] = {0};
  int n, x, y, j, k, x1, x2, y1, y2, a0, a1, a2, a3;
  a0 = a1 = a2 = a3 = 0;
  x1 = x2 = y1 = y2 = 1000000002;
  cin >> n >> x >> y;
  for (int i = 0; i < n; i++) {
    cin >> j >> k;
    if (j - x > 0) {
      if (j - x < x1) x1 = j - x;
      if (k - y > 0) {
        ar[0]++;
        if (k - y < y1) y1 = k - y;
      } else if (k - y < 0) {
        ar[3]++;
        if ((k - y) * (-1) < y2) y2 = (k - y) * (-1);
      } else {
        ar[0]++;
        ar[3]++;
        a0++;
      }
    } else if (j - x < 0) {
      if ((j - x) * (-1) < x2) x2 = (j - x) * (-1);
      if (k - y > 0) {
        ar[1]++;
        if (k - y < y1) y1 = k - y;
      } else if (k - y < 0) {
        ar[2]++;
        if ((k - y) * (-1) < y2) y2 = (k - y) * (-1);
      } else {
        ar[1]++;
        ar[2]++;
        a2++;
      }
    } else {
      if (k - y > 0) {
        ar[0]++;
        if (k - y < y1) y1 = k - y;
        ar[1]++;
        a1++;
      } else if (k - y < 0)
        ar[3]++;
      ar[2]++;
      if ((k - y) * (-1) < y2) y2 = (k - y) * (-1);
      a3++;
    }
  }
  int max = ar[0] + ar[3], lk = 4;
  ;
  for (int i = 0; i < 3; i++) {
    if (max < ar[i] + ar[i + 1]) {
      max = ar[i] + ar[i + 1];
      lk = (i + 1) * (i + 2);
    }
  }
  if (lk == 4)
    cout << max - a0 << '\n' << x1 + x << " " << y;
  else if (lk == 2)
    cout << max - a1 << '\n' << x << " " << y1 + y;
  else if (lk == 6)
    cout << max - a2 << '\n' << x - x2 << " " << y;
  else
    cout << max - a3 << '\n' << x << " " << y - y2;
  return 0;
}
