#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  std::vector<pair<long long, long long>> v;
  long long a[4] = {0};
  if ((sx - 1) >= 0) v.push_back(make_pair(sx - 1, sy));
  if (sy + 1 <= 1e9) v.push_back(make_pair(sx, sy + 1));
  if (sx + 1 <= 1e9) v.push_back(make_pair(sx + 1, sy));
  if ((sy - 1) >= 0) v.push_back(make_pair(sx, sy - 1));
  for (long long i = 0; i < n; ++i) {
    long long x, y;
    cin >> x >> y;
    if (x > sx && y > sy) {
      a[2]++;
      a[1]++;
    }
    if (x > sx && y < sy) {
      a[2]++;
      a[3]++;
    }
    if (x < sx && y < sy) {
      a[0]++;
      a[3]++;
    }
    if (x < sx && y > sy) {
      a[0]++;
      a[1]++;
    }
    if (x == sx && y > sy) {
      a[1]++;
    }
    if (x > sx && y == sy) {
      a[2]++;
    }
    if (x == sx && y < sy) {
      a[3]++;
    }
    if (x < sx && y == sy) {
      a[0]++;
    }
  }
  long long mx = a[0];
  long long ind = 0;
  for (long long i = 0; i < 4; ++i) {
    if (a[i] > mx) {
      mx = a[i];
      ind = i;
    }
  }
  cout << mx << endl;
  cout << v[ind].first << " " << v[ind].second;
  return 0;
}
