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;
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;
}
