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;
long long int pow(long long int x, long long int y, long long int m) {
  long long int res = 1;
  x = x % m;
  while (y > 0) {
    if (y & 1) res = ((res % m) * (x % m)) % m;
    y = y >> 1;
    x = ((x % m) * (x % m)) % m;
  }
  return res % m;
}
template <typename Arg1>
void ZZ(const char* name, Arg1&& arg1) {
  std::cerr << name << " = " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void ZZ(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " = " << arg1;
  ZZ(comma, args...);
}
const long long int INF = 0xFFFFFFFFFFFFFFFL;
clock_t time_p = clock();
void abhigyan10() {
  time_p = clock() - time_p;
  cerr << "Time Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
long long int seed;
mt19937 rng(seed = chrono::steady_clock::now().time_since_epoch().count());
inline long long int rnd(long long int l = 0, long long int r = INF) {
  return uniform_int_distribution<long long int>(l, r)(rng);
}
const long long int mod = 1000000007;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, i, j, x, y, sx, sy, a, b, max;
  vector<int> v(4);
  cin >> n >> sx >> sy;
  pair<int, int> p;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    p = make_pair(x, y);
    a = x - sx;
    b = y - sy;
    if (a > 0) v[0]++;
    if (a < 0) v[1]++;
    if (b > 0) v[2]++;
    if (b < 0) v[3]++;
  }
  max = v[0];
  j = 0;
  for (i = 0; i < 4; i++) {
    if (v[i] > max) {
      max = v[i];
      j = i;
    }
  }
  cout << max << "\n";
  if (j == 0) {
    cout << sx + 1 << " " << sy;
    return 0;
  }
  if (j == 1) {
    cout << sx - 1 << " " << sy;
    return 0;
  }
  if (j == 2) {
    cout << sx << " " << sy + 1;
    return 0;
  }
  if (j == 3) {
    cout << sx << " " << sy - 1;
    return 0;
  }
  return 0;
}
