#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
long long fx[] = {1, -1, 0, 0, 1, 1, -1, -1};
long long fy[] = {0, 0, 1, -1, 1, -1, 1, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  long long x[n + 5], y[n + 5];
  for (long long i = 1; i <= n; i++) cin >> x[i] >> y[i];
  long long mx = 0, px, py;
  for (long long i = 0; i < 8; i++) {
    long long sx1 = sx + fx[i];
    long long sy1 = sy + fy[i];
    long long c = 0;
    for (long long j = 1; j <= n; j++) {
      long long a = abs(sx1 - x[j]) + abs(sx1 - sx);
      long long b = abs(sy1 - y[j]) + abs(sy1 - sy);
      if (a <= abs(x[j] - sx) && b <= abs(y[j] - sy)) c++;
    }
    if (c > mx) {
      px = sx1;
      py = sy1;
      mx = c;
    }
  }
  cout << mx << endl << px << " " << py << endl;
  return 0;
}
