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() {
  long long int t, a, b, c, d, i, j, k, l, n, m, x, y, x1;
  cin >> n >> a >> b;
  l = 0;
  k = 0;
  j = 0;
  m = 0;
  t = 0;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    if (x > a) l++;
    if (x < a) k++;
    if (y > b) j++;
    if (y < b) m++;
  }
  if (l >= k && l >= j && l >= m) {
    cout << l << endl;
    cout << a + 1 << " " << b;
  } else if (k >= l && k >= j && k >= m) {
    cout << k << endl;
    cout << a - 1 << " " << b;
  } else if (j >= k && j >= l && j >= m) {
    cout << j << endl;
    cout << a << " " << b + 1;
  } else if (m >= k && m >= l && m >= j) {
    cout << m << endl;
    cout << a << " " << b - 1;
  }
}
