#include <bits/stdc++.h>
using namespace std;
int n;
long int x[200001], y[200001], a1[200001];
long int fun(int a, int b) {
  int cnt = 0;
  for (int i = 0; i < n; i++)
    if ((abs(a - x[i]) + abs(b - y[i])) < a1[i]) cnt++;
  return cnt;
}
int main() {
  cin >> n;
  int a, b;
  cin >> a >> b;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    a1[i] = abs(a - x[i]) + abs(b - y[i]);
  }
  int ans = 0, ansx = 0, ansy = 0;
  if (ans < fun(a - 1, b)) {
    ans = fun(a - 1, b);
    ansx = a - 1;
    ansy = b;
  }
  if (ans < fun(a, b - 1)) {
    ans = fun(a, b - 1);
    ansx = a;
    ansy = b - 1;
  }
  if (ans < fun(a, b + 1)) {
    ans = fun(a, b + 1);
    ansx = a;
    ansy = b + 1;
  }
  if (ans < fun(a + 1, b)) {
    ans = fun(a + 1, b);
    ansx = a + 1;
    ansy = b;
  }
  cout << ans << "\n" << ansx << " " << ansy;
}
