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>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroint-loops")
using namespace std;
const int MAXN = 3e5;
void solve() {
  long long n, xs, ys;
  cin >> n >> xs >> ys;
  vector<long long> x(n), y(n);
  vector<long long> k(4);
  vector<pair<long long, long long> > ans = {
      {xs, ys - 1}, {xs - 1, ys}, {xs, ys + 1}, {xs + 1, ys}};
  for (int i = 0; i < n; ++i) {
    cin >> x[i] >> y[i];
  }
  for (int i = 0; i < n; ++i) {
    if (y[i] <= ys - 1) {
      k[0]++;
    }
    if (x[i] <= xs - 1) {
      k[1]++;
    }
    if (y[i] >= ys + 1) {
      k[2]++;
    }
    if (x[i] >= xs + 1) {
      k[3]++;
    }
  }
  long long mx = 0, ind = 0;
  for (int i = 0; i < 4; ++i) {
    if (k[i] > mx) {
      mx = k[i], ind = i;
    }
  }
  cout << mx << '\n' << ans[ind].first << ' ' << ans[ind].second << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  srand(time(nullptr));
  int test = 1;
  while (test--) solve();
  return 0;
}
