#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  clock_t launch = clock();
  long long t = 1;
  while (t--) {
    long long n, sx, sy, a = 0, b = 0, c = 0, d = 0, x, y;
    vector<pair<long long, long long> > p;
    for (long long i = 0; i < 4; i++) p.push_back(make_pair(0, i));
    cin >> n >> sx >> sy;
    for (long long i = 0; i < n; i++) {
      cin >> x >> y;
      x -= sx;
      y -= sy;
      if (x > 0) p[3].first++;
      if (x < 0) p[1].first++;
      if (y > 0) p[0].first++;
      if (y < 0) p[2].first++;
    }
    sort(p.begin(), p.end());
    if (p[3].second == 0) {
      cout << p[3].first << endl;
      cout << sx << " " << sy + 1 << endl;
    }
    if (p[3].second == 1) {
      cout << p[3].first << endl;
      cout << sx - 1 << " " << sy << endl;
    }
    if (p[3].second == 2) {
      cout << p[3].first << endl;
      cout << sx << " " << sy - 1 << endl;
    }
    if (p[3].second == 3) {
      cout << p[3].first << endl;
      cout << sx + 1 << " " << sy << endl;
    }
  }
  clog << ((long double)(clock() - launch) / CLOCKS_PER_SEC) << "\n";
  return 0;
}
