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;
void debug_out() { cerr << endl; }
void clock_out() {
  cerr << "\nTime Elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << " s\n";
}
void fileio() {
  freopen("/home/dwai/Desktop/cp/input.txt", "r", stdin);
  freopen("/home/dwai/Desktop/cp/output.txt", "w", stdout);
  freopen("/home/dwai/Desktop/cp/debug.txt", "w", stderr);
}
void ofileio() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << H;
  debug_out(T...);
}
int IT_MAX = 1 << 20;
const long long MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1);
const double ERR = 1e-10;
void solve() {
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  vector<pair<long long, long long> > v(n);
  long long i;
  long long d[n];
  for (i = 0; i < n; i++) {
    cin >> v[i].first >> v[i].second;
    d[i] = abs(v[i].first - sx) + abs(v[i].second - sy);
  }
  pair<long long, long long> p;
  long long m = 0;
  vector<pair<long long, long long> > pos({{0, 1}, {0, -1}, {1, 0}, {-1, 0}});
  for (pair<long long, long long> cord : pos) {
    long long cx = cord.first + sx, cy = cord.second + sy;
    long long cm = 0;
    i = 0;
    for (pair<long long, long long> x : v) {
      long long cd = abs(cx - x.first) + abs(cy - x.second);
      if (cd < d[i]) cm++;
      i++;
    }
    if (cm > m) {
      m = cm;
      p = make_pair(cx, cy);
    }
  }
  cout << m << "\n" << p.first << " " << p.second;
}
int main() {
  42;
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
