#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 2e18;
string Z = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string z = "abcdefghijklmnopqrstuvwxyz";
long long n, sx, sy;
vector<pair<long long, long long>> v;
long long isin(long long tx, long long ty, long long x, long long y) {
  long long xf = 0;
  if (sx <= x) {
    if (tx >= sx && tx <= x) xf = 1;
  } else {
    if (tx >= x && tx <= sx) xf = 1;
  }
  long long yf = 0;
  if (sy <= y) {
    if (ty >= sy && ty <= y) yf = 1;
  } else {
    if (ty >= y && ty <= sy) yf = 1;
  }
  if (xf == 1 && yf == 1) return 1;
  return 0;
}
long long f(long long tx, long long ty) {
  long long res = 0;
  for (long long i = 0; i < n; i++) {
    if (isin(tx, ty, v[i].first, v[i].second)) {
      res++;
    }
  }
  return res;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long o = 0;
  if (o) {
    freopen("fin.txt", "r", stdin);
    freopen("fout.txt", "w", stdout);
  }
  cin >> n >> sx >> sy;
  v.resize(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i].first >> v[i].second;
  }
  long long res = 0;
  long long rx = -1;
  long long ry = -1;
  if (f(sx + 1, sy) >= res) {
    res = f(sx + 1, sy);
    rx = sx + 1;
    ry = sy;
  }
  if (f(sx - 1, sy) >= res) {
    res = f(sx - 1, sy);
    rx = sx - 1;
    ry = sy;
  }
  if (f(sx, sy + 1) >= res) {
    res = f(sx, sy + 1);
    rx = sx;
    ry = sy + 1;
  }
  if (f(sx, sy - 1) >= res) {
    res = f(sx, sy - 1);
    rx = sx;
    ry = sy - 1;
  }
  cout << res << endl;
  cout << rx << " " << ry << endl;
  return 0;
}
