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;
const long long homu = 2e5;
long long x[homu], y[homu];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, i, j, k, l, m, X, Y;
  cin >> n >> X >> Y;
  long long one = 0, two = 0, three = 0, four = 0, onetwo = 0, twothree = 0,
            threefour = 0, fourone = 0;
  for (i = 1; i <= n; ++i) {
    cin >> x[i] >> y[i];
    if (x[i] > X && y[i] > Y) {
      one++;
    } else if (x[i] == X && y[i] > Y) {
      onetwo++;
    } else if (x[i] < X && y[i] > Y) {
      two++;
    } else if (x[i] < X && y[i] == Y) {
      twothree++;
    } else if (x[i] < X && y[i] < Y) {
      three++;
    } else if (x[i] == X && y[i] < Y) {
      threefour++;
    } else if (x[i] > X && y[i] < Y) {
      four++;
    } else if (x[i] > X && y[i] == Y) {
      fourone++;
    }
  }
  long long xet1, xet2, xet3, xet4;
  xet1 = one + onetwo + two;
  xet2 = two + twothree + three;
  xet3 = three + threefour + four;
  xet4 = four + fourone + one;
  long long ans1 = -1;
  long long ans2 = 0;
  ans1 = max(xet1, xet2);
  ans1 = max(ans1, xet3);
  ans1 = max(ans1, xet4);
  cout << ans1 << '\n';
  if (ans1 == xet1) {
    cout << X << ' ' << Y + 1;
    return 0;
  } else if (ans1 == xet2) {
    cout << X - 1 << ' ' << Y;
    return 0;
  } else if (ans1 == xet3) {
    cout << X << ' ' << Y - 1;
    return 0;
  } else {
    cout << X + 1 << ' ' << Y;
    return 0;
  }
  cout << '\n' << ans1;
}
