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 mod = 1000000007;
inline int fast_expo(int base, int power, int modulo = mod) {
  base %= modulo;
  if (base < 0) base += modulo;
  long long x = base, cnt = power, ans = 1;
  while (cnt) {
    if (cnt & 1) ans = (ans * x) % modulo;
    x = (x * x) % modulo;
    cnt >>= 1;
  }
  return ans;
}
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int first = 0;
  cerr << '{';
  for (auto &i : x) cerr << (first++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const int INF = (int)1e9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long x, y;
  cin >> x >> y;
  vector<pair<long long, long long> > h;
  for (int i = (0); i < long long(long long(n)); ++i) {
    long long a, b;
    cin >> a >> b;
    h.push_back(make_pair(a, b));
  }
  long long countl = 0;
  long long countr = 0;
  long long countu = 0;
  long long countd = 0;
  for (int i = 0; i < n; ++i) {
    if (h[i].first > x) {
      countr++;
    } else {
      countl++;
    }
    if (h[i].first > y) {
      countu++;
    } else {
      countd++;
    }
  };
  if (max(countl, max(countr, max(countu, countd))) == countl) {
    cout << countl << endl << x - 1 << " " << y << endl;
  } else if (max(countl, max(countr, max(countu, countd))) == countr) {
    cout << countr << endl << x + 1 << " " << y << endl;
  } else if (max(countl, max(countr, max(countu, countd))) == countu) {
    cout << countu << endl << x << " " << y + 1 << endl;
  } else {
    cout << countd << endl << x - 1 << " " << y - 1 << endl;
  }
  return 0;
}
