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 x[4] = {0, 1, 0, -1};
int y[4] = {1, 0, -1, 0};
int n, sx, sy;
int number1, number2;
int x2, y2;
int m = 2e9 + 10;
int number[4];
int main() {
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) {
    m = 2e9 + 10;
    cin >> number1 >> number2;
    for (int j = 0; j < 4; j++) {
      x2 = sx + x[j];
      y2 = sy + y[j];
      m = min((int)abs(x2 - number1) + (int)abs(y2 - number2), m);
    }
    for (int j = 0; j < 4; j++) {
      x2 = sx + x[j];
      y2 = sy + y[j];
      if ((int)abs(x2 - number1) + (int)abs(y2 - number2) == m) number[j]++;
    }
  }
  int ans = max(max(number[0], number[1]), max(number[2], number[3]));
  cout << ans << endl;
  for (int i = 0; i < 4; i++) {
    if (number[i] == ans) {
      if (sx + x[i] >= 0 && sy + y[i] >= 0 && sy + y[i] <= 1e9 &&
          sx + x[i] <= 1e9) {
        cout << sx + x[i] << " " << sy + y[i] << endl;
        return 0;
      }
    }
  }
  return 0;
}
