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;
long long int power(long long int a, long long int b) {
  if (b == 0) {
    return 1;
  } else if (b % 2 == 0) {
    return power((a * a) % 1000000007, b / 2);
  } else {
    return (a * power((a * a) % 1000000007, b / 2) % 1000000007);
  }
}
int main() {
  long long int n, i, a, b, xp, xm, yp, ym, x, y;
  cin >> n >> a >> b;
  xp = 0;
  xm = 0;
  yp = 0;
  ym = 0;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    if (x >= a + 1) xp++;
    if (x <= a - 1) xm++;
    if (y >= b + 1) yp++;
    if (y <= b - 1) ym++;
  }
  long long int m = (xp > (xm > (yp > ym) ? yp : ym) ? xm
                     : (yp > ym)                     ? yp
                                                     : ym)
                        ? xp
                    : (xm > (yp > ym) ? yp : ym) ? xm
                    : (yp > ym)                  ? yp
                                                 : ym;
  if (m == xp) {
    cout << m << '\n';
    cout << a + 1 << ' ' << b;
  } else if (m == xm) {
    cout << m << '\n';
    cout << a - 1 << ' ' << b;
  } else if (m == yp) {
    cout << m << '\n';
    cout << a << ' ' << b + 1;
  } else if (m == ym) {
    cout << m << '\n';
    cout << a << ' ' << b - 1;
  }
  return 0;
}
