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() {
  long long int n, sx, sy;
  cin >> n >> sx >> sy;
  long long int lu = 0, lc = 0, ld = 0, ru = 0, rc = 0, rd = 0, up = 0,
                down = 0;
  for (long long int i = 0; i < n; i++) {
    long long int x, y;
    cin >> x >> y;
    if (x > sx && y > sy) {
      ru++;
    } else if (x > sx && y == sy) {
      rc++;
    } else if (x > sx && y < sy) {
      rd++;
    } else if (x == sx && y > sy) {
      up++;
    } else if (x == sx && y < sy) {
      down++;
    } else if (x < sx && y > sy) {
      lu++;
    } else if (x < sx && y == sy) {
      lc++;
    } else if (x < sx && y < sy) {
      ld++;
    }
  }
  if (lu + up + ru >= lu + lc + ld && lu + up + ru >= ld + down + rd &&
      lu + up + ru >= ru + rc + rd) {
    cout << lu + up + ru << endl;
    cout << sx << " " << sy + 1 << endl;
  } else if (lu + lc + ld >= lu + up + ru && lu + lc + ld >= ld + down + rd &&
             lu + lc + ld >= ru + rc + rd) {
    cout << lu + lc + ld << endl;
    cout << sx - 1 << " " << sy << endl;
  } else if (ld + down + rd >= lu + up + ru && ld + down + rd >= lu + lc + ld &&
             ld + down + rd >= ru + rc + rd) {
    cout << ld + down + rd << endl;
    cout << sx << " " << sy - 1 << endl;
  } else if (ru + rc + rd >= lu + up + ru && ru + rc + rd >= ld + down + rd &&
             ru + rc + rd >= lu + lc + ld) {
    cout << ru + rc + rd << endl;
    cout << sx + 1 << " " << sy << endl;
  }
  return 0;
}
