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 mod = 1e9 + 7;
const long double PI = 3.1415926535897932384626;
const long double eps = 1e-9;
long long power(long long x, long long y) {
  long long ans = 1;
  x = x % mod;
  while (y > 0) {
    if (y & 1) ans = (ans * x) % mod;
    y = y >> 1;
    x = (x * x) % mod;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, sx, sy, ind, count;
  cin >> n >> sx >> sy;
  pair<long long, long long> arr[n];
  for (long long i = (long long)(0); i < (long long)(n); ++i)
    cin >> arr[i].first >> arr[i].second;
  count = 0;
  vector<pair<long long, pair<long long, long long> > > v;
  for (long long i = (long long)(0); i < (long long)(n); ++i) {
    if (sx < arr[i].first) count++;
  }
  v.push_back(make_pair(count, make_pair(sx + 1, sy)));
  count = 0;
  for (long long i = (long long)(0); i < (long long)(n); ++i) {
    if (sx > arr[i].first) count++;
  }
  v.push_back(make_pair(count, make_pair(sx - 1, sy)));
  count = 0;
  for (long long i = (long long)(0); i < (long long)(n); ++i) {
    if (sy < arr[i].second) count++;
  }
  v.push_back(make_pair(count, make_pair(sx, sy + 1)));
  count = 0;
  for (long long i = (long long)(0); i < (long long)(n); ++i) {
    if (sy > arr[i].second) count++;
  }
  v.push_back(make_pair(count, make_pair(sx, sy - 1)));
  ind = max_element(v.begin(), v.end()) - v.begin();
  cout << v[ind].first << '\n'
       << v[ind].second.first << " " << v[ind].second.second;
  return 0;
}
