#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, sx, sy;
  cin >> n >> sx >> sy;
  map<pair<int, int>, int> possibleAns;
  possibleAns[make_pair(sx - 1, sy)] = 0;
  possibleAns[make_pair(sx + 1, sy)] = 0;
  possibleAns[make_pair(sx, sy - 1)] = 0;
  possibleAns[make_pair(sx, sy + 1)] = 0;
  int ax, ay;
  pair<int, int> ansPair;
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    cin >> ax >> ay;
    for (auto& element : possibleAns) {
      int bx = element.first.first;
      int by = element.first.second;
      if (min(sx, ax) <= bx && bx <= max(sx, ax) && min(sy, ay) <= by &&
          by <= max(sy, ay)) {
        element.second++;
        if (element.second > ans) {
          ansPair = element.first;
          ans = element.second;
        }
      }
    }
  }
  cout << ans << endl;
  cout << ansPair.first << " " << ansPair.second << endl;
  return 0;
}
