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;
int32_t main() {
  long long n, a = 0, b = 0;
  cin >> n >> a >> b;
  pair<long long, long long> v[n];
  for (long long i = 0; i < n; i++) cin >> v[i].first >> v[i].second;
  long long u = 0, d = 0, l = 0, r = 0;
  for (long long i = 0; i < n; i++) {
    if (v[i].first > a) r++;
    if (v[i].first < a) l++;
    if (v[i].second > b) u++;
    if (v[i].second < b) d++;
  }
  long long x, m = 0;
  if (r > m) m = r, x = 1;
  if (l > m) m = l, x = 2;
  if (u > m) m = u, x = 3;
  if (d > m) m = d, x = 4;
  cout << m << endl;
  if (x == 1)
    cout << a + 1 << " " << b << endl;
  else if (x == 2)
    cout << a - 1 << " " << b << endl;
  else if (x == 3)
    cout << a << " " << b + 1 << endl;
  else
    cout << a << " " << b - 1 << endl;
}
