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() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  vector<pair<int, int> > coordinates;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    coordinates.push_back({x, y});
  }
  vector<pair<int, int> > possible_ans{
      {sx + 1, sy},     {sx - 1, sy},     {sx, sy + 1},     {sx, sy - 1},
      {sx + 1, sy + 1}, {sx + 1, sy - 1}, {sx - 1, sy + 1}, {sx - 1, sy - 1}};
  int maxm = 0, posx = -1, posy = -1;
  for (auto x : possible_ans) {
    int xx = x.first;
    int yy = x.second;
    int count = 0;
    for (auto coord : coordinates) {
      int coordx = coord.first;
      int coordy = coord.second;
      int minx = min(sx, coordx);
      int maxx = max(sx, coordx);
      int miny = min(sy, coordy);
      int maxy = max(sy, coordy);
      if (xx >= minx && xx <= maxx) {
        if (yy >= miny && yy <= maxy) {
          count++;
        }
      }
    }
    if (count > maxm) {
      maxm = count;
      posx = xx;
      posy = yy;
    }
  }
  cout << maxm << '\n';
  cout << posx << " " << posy;
  return 0;
}
