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;
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;
}
