#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<long long, long long> > v;
  long long n, x, y;
  cin >> n;
  cin >> x >> y;
  for (long long i = 1; i <= n; i++) {
    long long a, b;
    cin >> a >> b;
    v.push_back({a, b});
  }
  long long c1 = 0, c2 = 0;
  long long c3 = 0, c4 = 0, c5 = 0;
  for (long long i = 0; i < n; i++) {
    if (x > v[i].first) c1++;
    if (x < v[i].first) c2++;
    if (y > v[i].second) c3++;
    if (y < v[i].second) c4++;
  }
  vector<pair<long long, long long> > vec;
  vec.push_back({c1, 1});
  vec.push_back({c2, 2});
  vec.push_back({c3, 3});
  vec.push_back({c4, 4});
  sort(vec.begin(), vec.end());
  reverse(vec.begin(), vec.end());
  if (vec[0].second == 1) {
    cout << vec[0].first << endl;
    cout << x - 1 << " " << y;
  } else if (vec[0].second == 2) {
    cout << vec[0].first << endl;
    cout << x + 1 << " " << y;
  } else if (vec[0].second == 3) {
    cout << vec[0].first << endl;
    cout << x << " " << y - 1;
  } else if (vec[0].second == 4) {
    cout << vec[0].first << endl;
    cout << x << " " << y + 1;
  }
  return 0;
}
