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(void) {
  int i, n, sx, sy, b, c;
  cin >> n >> sx >> sy;
  vector<pair<int, int>> v;
  for (i = 0; i < n; i++) {
    cin >> c >> b;
    v.push_back({c, b});
  }
  int a[4];
  memset(a, 0, sizeof(a));
  auto it = v.begin();
  while (it != v.end()) {
    if (it->first < sx) a[0]++;
    if (it->first > sx) a[1]++;
    if (it->second < sy) a[2]++;
    if (it->second > sy) a[3]++;
    it++;
  }
  int max = a[0], cr = 0;
  for (i = 0; i < 4; i++) {
    if (a[i] > max) {
      max = a[i];
      cr = i;
    }
  }
  if (cr == 0) cout << max << endl << sx - 1 << " " << sy;
  if (cr == 1) cout << max << endl << sx + 1 << " " << sy;
  if (cr == 2) cout << max << endl << sx << " " << sy - 1;
  if (cr == 3) cout << max << endl << sx - 1 << " " << sy + 1;
}
