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() {
  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;
}
