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