#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  int l = 0, r = 0, u = 0, d = 0;
  while (n--) {
    int x, y;
    cin >> x >> y;
    if (sx - 1 >= x)
      l++;
    else if (sx + 1 <= x)
      r++;
    if (sy - 1 >= y)
      d++;
    else if (sy + 1 <= y)
      u++;
  }
  vector<int> dir = {l, r, u, d};
  int mx = max(l, max(r, max(u, d)));
  cout << mx << '\n';
  if (mx == l)
    cout << sx - 1 << " " << sy << '\n';
  else if (mx == r)
    cout << sx + 1 << " " << sy << '\n';
  else if (mx == d)
    cout << sx << " " << sy - 1 << '\n';
  else
    cout << sx << " " << sy + 1 << '\n';
  return 0;
}
