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;
const long long M = 1e9;
int main() {
  long long n, i, sx, sy, mx = 0, ax, ay, j, cnt;
  cin >> n >> sx >> sy;
  long long x[n], y[n];
  for (i = 0; i < n; i++) cin >> x[i] >> y[i];
  int dx[4] = {0, 0, 1, -1};
  int dy[4] = {1, -1, 0, 0};
  for (j = 0; j < 3; j++) {
    long long nsx = sx + dx[j];
    long long nsy = sy + dy[j];
    cnt = 0;
    for (i = 0; i < n; i++) {
      long long d1 = abs(sx - x[i]) + abs(sy - y[i]);
      long long d2 = abs(nsx - x[i]) + abs(nsy - y[i]);
      if (d1 == d2 + 1) cnt++;
    }
    if (cnt > mx) {
      mx = cnt;
      ax = nsx;
      ay = nsy;
    }
  }
  cout << mx << "\n";
  cout << ax << " " << ay;
  return 0;
}
