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