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