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;
  int xi[n + 1], yi[n + 1];
  for (int i = 0; i < n; ++i) {
    cin >> xi[i] >> yi[i];
  }
  int arr[4] = {0};
  for (int i = 0; i < n; ++i) {
    if (yi[i] > sy)
      arr[0]++;
    else if (yi[i] < sy)
      arr[1]++;
    if (xi[i] > sx)
      arr[2]++;
    else if (xi[i] < sx)
      arr[3]++;
  }
  int max = 0, index = -1;
  for (int i = 0; i < 4; ++i) {
    if (arr[i] > max) {
      max = arr[i];
      index = i;
    }
  }
  cout << max << endl;
  if (index == 0) {
    cout << sx << " " << sy + 1;
  } else if (index == 1) {
    cout << sx << " " << sy - 1;
  } else if (index == 2)
    cout << (sx + 1) << " " << sy;
  else if (index == 3)
    cout << (sx - 1) << " " << sy;
}
