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;
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
const int INF = 1 << 29;
inline int two(int n) { return 1 << n; }
inline int test(int n, int b) { return (n >> b) & 1; }
inline void set_bit(int& n, int b) { n |= two(b); }
inline void unset_bit(int& n, int b) { n &= ~two(b); }
inline int last_bit(int n) { return n & (-n); }
inline int ones(int n) {
  int res = 0;
  while (n && ++res) n -= n & (-n);
  return res;
}
template <class T>
void chmax(T& a, const T& b) {
  a = max(a, b);
}
template <class T>
void chmin(T& a, const T& b) {
  a = min(a, b);
}
int main() {
  long long n, x, y, a, b, hor = 0, ver = 0, bac = 0, niche = 0;
  cin >> n >> x >> y;
  for (int i = 1; i <= n; i++) {
    cin >> a >> b;
    if (a >= x + 1) hor++;
    if (b >= y + 1) ver++;
    if (a <= x - 1) bac++;
    if (b <= y - 1) niche++;
  }
  if (hor >= ver && hor >= bac && hor >= niche) {
    cout << hor << endl;
    cout << x + 1 << " " << y << endl;
  } else if (ver >= hor && ver >= bac && ver >= niche) {
    cout << ver << endl;
    cout << x << " " << y + 1 << endl;
  } else if (bac >= hor && bac >= ver && bac >= niche) {
    cout << bac << endl;
    cout << x - 1 << " " << y << endl;
  } else {
    cout << niche << endl;
    cout << x << " " << y - 1 << endl;
  }
  return 0;
  return 0;
}
