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;
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;
}
