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 dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  int cnt[4];
  cnt[0] = cnt[1] = cnt[2] = cnt[3] = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x < sx) {
      if (y < sy) {
        if (sx - x >= sy - y) cnt[0]++;
        if (sy - y >= sx - x) cnt[1]++;
      } else {
        if (sx - x >= y - sy) cnt[0]++;
        if (y - sy >= sx - x) cnt[3]++;
      }
    } else {
      if (y < sy) {
        if (x - sx >= sy - y) cnt[2]++;
        if (sy - y >= x - sx) cnt[1]++;
      } else {
        if (x - sx >= y - sy) cnt[2]++;
        if (y - sy >= x - sx) cnt[3]++;
      }
    }
  }
  int ret = max(max(cnt[0], cnt[1]), max(cnt[2], cnt[3]));
  for (int i = 0; i < 4; i++) {
    if (cnt[i] == ret) {
      cout << ret << '\n';
      cout << (sx + dx[i]) << " " << (sy + dy[i]) << '\n';
      break;
    }
  }
  return 0;
}
