#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x, y, p = 0, q = 0, r = 0, s = 0, l, m, ans = 0;
  cin >> n;
  cin >> x >> y;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    a -= x;
    b -= y;
    if ((a > 0 && b > 0) || (a < 0 && b > 0) || (a == 0 && b > 0)) p++;
    if ((a < 0 && b > 0) || (a < 0 && b < 0) || (b == 0 && a < 0)) q++;
    if ((a < 0 && b < 0) || (a > 0 && b < 0) || (a == 0 && b < 0)) r++;
    if ((a > 0 && b < 0) || (a > 0 && b > 0) || (a > 0 && b == 0)) s++;
  }
  l = max(p, q);
  m = max(r, s);
  ans = max(l, m);
  cout << ans << endl;
  if (ans == p)
    cout << x << " " << y + 1 << endl;
  else if (ans == q)
    cout << x - 1 << " " << y << endl;
  else if (ans == r)
    cout << x << " " << y - 1 << endl;
  else
    cout << x + 1 << " " << y << endl;
}
