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;
const long long inf = 1e18, mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  vector<pair<long long, long long>> v;
  for (long long i = 0; i < n; ++i) {
    long long x, y;
    cin >> x >> y;
    v.push_back({x, y});
  }
  long long cnt = 0;
  long long fst = 0;
  for (int i = 0; i < n; ++i) {
    long long distsc = abs(v[i].first - sx) + abs(v[i].second - sy);
    long long distcntr = abs(v[i].first - sx) + abs(v[i].second - (sy + 1));
    long long dcs = 1;
    if (distsc == distcntr + dcs) {
      fst++;
    }
  }
  long long snd = 0;
  for (int i = 0; i < n; ++i) {
    long long distsc = abs(v[i].first - sx) + abs(v[i].second - sy);
    long long distcntr = abs(v[i].first - sx) + abs(v[i].second - (sy - 1));
    long long dcs = 1;
    if (distsc == distcntr + dcs) {
      snd++;
    }
  }
  long long thd = 0;
  for (int i = 0; i < n; ++i) {
    long long distsc = abs(v[i].first - sx) + abs(v[i].second - sy);
    long long distcntr = abs(v[i].first - (sx + 1)) + abs(v[i].second - sy);
    long long dcs = 1;
    if (distsc == distcntr + dcs) {
      thd++;
    }
  }
  long long frth = 0;
  for (int i = 0; i < n; ++i) {
    long long distsc = abs(v[i].first - sx) + abs(v[i].second - sy);
    long long distcntr = abs(v[i].first - (sx - 1)) + abs(v[i].second - sy);
    long long dcs = 1;
    if (distsc == distcntr + dcs) {
      frth++;
    }
  }
  if (fst >= snd && fst >= thd && fst >= frth) {
    cout << fst << endl;
    cout << sx << " " << sy + 1;
    return 0;
  }
  if (snd >= fst && snd >= thd && snd >= frth) {
    cout << snd << endl;
    cout << sx << " " << sy - 1;
    return 0;
  }
  if (thd >= fst && thd >= snd && thd >= frth) {
    cout << thd << endl;
    cout << sx + 1 << " " << sy;
    return 0;
  }
  if (frth >= fst && frth >= thd && frth >= snd) {
    cout << frth << endl;
    cout << sx - 1 << " " << sy;
    return 0;
  }
  return 0;
}
