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