#include <bits/stdc++.h>
using namespace std;
struct punkt {
  int x;
  int y;
};
punkt tab[200007];
int main() {
  int n, sx, sy, i, wd = 0, wg = 0, wl = 0, wp = 0, w;
  cin >> n >> sx >> sy;
  for (i = 0; i < n; i++) {
    cin >> tab[i].x >> tab[i].y;
    if (tab[i].x < sx) {
      wl++;
    }
    if (tab[i].x > sx) {
      wp++;
    }
    if (tab[i].y < sy) {
      wd++;
    }
    if (tab[i].y > sy) {
      wg++;
    }
  }
  w = max(max(wd, wg), max(wl, wp));
  cout << w << '\n';
  if (w == wd) {
    cout << sx << ' ' << sy - 1 << '\n';
    return 0;
  }
  if (w == wp) {
    cout << sx + 1 << ' ' << sy << '\n';
    return 0;
  }
  if (w == wl) {
    cout << sx - 1 << ' ' << sy << '\n';
    return 0;
  }
  if (w == wg) {
    cout << sx << ' ' << sy + 1 << '\n';
    return 0;
  }
  return 0;
}
