#include <bits/stdc++.h>
using namespace std;
void init_code() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  init_code();
  long long int n, x, y;
  cin >> n >> x >> y;
  long long int q1 = 0, q2 = 0, q3 = 0, q4 = 0;
  long long int a = 0, b = 0, c = 0, d = 0;
  long long int arr[n][2];
  for (int i = 0; i < n; ++i) {
    long long int x1, y1;
    cin >> x1 >> y1;
    arr[i][0] = x1 - x;
    arr[i][1] = y1 - y;
    if (arr[i][0] >= 0 && arr[i][1] >= 0) {
      q1++;
    } else if (arr[i][0] <= 0 && arr[i][1] >= 0) {
      q2++;
    } else if (arr[i][0] <= 0 && arr[i][1] <= 0) {
      q3++;
    } else
      q4++;
    if (arr[i][0] > 0 && arr[i][1] == 0) a++;
    if (arr[i][0] == 0 && arr[i][1] > 0) b++;
    if (arr[i][0] < 0 && arr[i][1] == 0) c++;
    if (arr[i][0] == 0 && arr[i][1] < 0) d++;
  }
  long long int sum[4] = {q1 + q2 - c - a, q2 + q3 - b - d, q3 + q4 - a - c,
                          q4 + q1 - b - d};
  long long int k = 0, add = sum[0];
  for (int i = 0; i < 4; ++i) {
    if (sum[i] > add) {
      add = sum[i];
      k = i;
    }
  }
  cout << add << endl;
  if (k == 0) {
    cout << x << " " << y + 1 << endl;
  } else if (k == 1) {
    cout << x - 1 << " " << y << endl;
  } else if (k == 2) {
    cout << x << " " << y - 1 << endl;
  } else
    cout << x + 1 << " " << y << endl;
  return 0;
}
