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() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin.exceptions(ios::badbit | ios::failbit);
  long long t = 1;
  while (t--) {
    long long n, sx, sy;
    cin >> n >> sx >> sy;
    long long ycord = -1;
    long long xcord = -1;
    vector<long long> x(n, 0), y(n, 0);
    for (int i = 0; i < n; i++) {
      cin >> x[i];
      cin >> y[i];
      y[i] -= sy;
      x[i] -= sx;
    }
    sort(y.begin(), y.end());
    sort(x.begin(), x.end());
    vector<long long>::iterator x0 = lower_bound(x.begin(), x.end(), 0);
    vector<long long>::iterator y0 = lower_bound(y.begin(), y.end(), 0);
    long long xtemp = distance(x.begin(), x0);
    long long ytemp = distance(y.begin(), y0);
    long long ymax = max(ytemp, n - ytemp);
    long long xmax = max(xtemp, n - xtemp);
    if (xmax > ymax) {
      cout << xmax << endl;
      cout << (xtemp > n / 2 ? *x0 + sx : *(x0 + 1) + sx) << " " << sy << endl;
    } else {
      cout << ymax << endl;
      cout << sx << " " << (ytemp > n / 2 ? *y0 + sy : *(y0 + 1) + sy) << endl;
    }
  }
  return 0;
}
