#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5;
long long n, sx, sy, X[N], Y[N], dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0},
                                 res;
long long f(long long x, long long y) {
  long long c = 0;
  if (x < 0 || y < 0 || x > 1e9 || y > 1e9) return -1;
  for (long long i = 0; i < n; ++i)
    if (min(sx, X[i]) <= x && x <= max(sx, X[i]) && min(sy, Y[i]) <= y &&
        y <= max(sy, Y[i]))
      c++;
  return c;
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> sx >> sy;
  for (long long i = 0; i < n; ++i) cin >> X[i] >> Y[i];
  long long ax, ay;
  for (long long i = 0; i < 4; ++i) {
    if (f(sx + dx[i], sy + dy[i]) >= res) {
      res = f(sx + dx[i], sy + dy[i]);
      ax = sx + dx[i];
      ay = sy + dy[i];
    }
  }
  cout << res << '\n' << ax << ' ' << ay;
}
