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