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 min(long long a, long long b) { return a < b ? a : b; }
long long max(long long a, long long b) { return a > b ? a : b; }
void solve() {
  long long n, a, b;
  cin >> n >> a >> b;
  vector<pair<long long, long long>> v;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    v.push_back({x, y});
  }
  long long k1 = 0, k2 = 0, k3 = 0, k4 = 0;
  for (long long i = 0; i < n; i++) {
    if (v[i].first > a) k1++;
    if (v[i].first < a) k2++;
    if (v[i].second > b) k3++;
    if (v[i].second < b) k4++;
  }
  if (k1 >= k2 && k1 >= k3 && k1 >= k4) {
    cout << k1 << '\n';
    cout << a + 1 << " " << b;
  } else if (k2 >= k1 && k2 >= k3 && k2 >= k4) {
    cout << k2 << '\n';
    cout << a - 1 << " " << b;
  } else if (k3 >= k2 && k3 >= k1 && k3 >= k4) {
    cout << k3 << '\n';
    cout << a << " " << b + 1;
  } else if (k4 >= k1 && k4 >= k2 && k4 >= k3) {
    cout << k4 << '\n';
    cout << a << " " << b - 1;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
}
