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;
template <class T1, class T2>
ostream& operator<<(ostream& out, pair<T1, T2> p) {
  out << '(' << p.first << ',' << p.second << ')';
  return out;
}
template <class T1, class T2>
istream& operator>>(istream& in, pair<T1, T2>& p) {
  in >> p.first >> p.second;
  return in;
}
template <class T>
istream& operator>>(istream& in, vector<T>& v) {
  for (auto& x : v) in >> x;
  return in;
}
template <class T>
ostream& operator<<(ostream& out, vector<vector<T>>& v) {
  for (auto& x : v) out << x << '\n';
  return out;
}
template <class T>
ostream& operator<<(ostream& out, vector<T>& v) {
  for (auto x : v) out << x << ' ';
  return out;
}
long long gcd(long long a, long long b) {
  if (b > a) swap(a, b);
  return (b ? gcd(b, a % b) : a);
}
const long double pi = acos(-1);
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cerr.setstate(ios::failbit);
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  vector<int> v(4);
  vector<pair<long long, long long>> vp{
      {sx - 1, sy}, {sx + 1, sy}, {sx, sy - 1}, {sx, sy + 1}};
  for (register int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    if (x - sx >= 0)
      v[1]++;
    else
      v[0]++;
    if (y - sy >= 0)
      v[2]++;
    else
      v[3]++;
  }
  int b = 0;
  for (register int i = 0; i < 4; i++) {
    if (v[i] > v[b]) b = i;
  }
  cout << v[b] << '\n' << vp[b].first << ' ' << vp[b].second;
}
