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;
long long n, i, mx[200009], my[200009], xs, ys, r, l, u, d, mxp;
int main() {
  cin >> n >> xs >> ys;
  for (i = 0; i < n; i++) {
    cin >> mx[i] >> my[i];
    if (mx[i] < xs) l++;
    if (mx[i] > xs) r++;
    if (my[i] < ys) d++;
    if (my[i] > ys) u++;
  }
  mxp = max(max(r, l), max(u, d));
  cout << mxp << endl;
  if (u == mxp) {
    cout << xs << " " << ys + 1;
    return 0;
  }
  if (d == mxp) {
    cout << xs << " " << ys - 1;
    return 0;
  }
  if (r == mxp) {
    cout << xs + 1 << " " << ys;
    return 0;
  }
  if (l == mxp) {
    cout << xs - 1 << " " << ys;
    return 0;
  }
  return 0;
}
