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;
pair<int, int> arr[200200];
int main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  int tx, ty;
  int rightPoints = 0;
  int leftPoints = 0;
  int upPoints = 0;
  int downPoints = 0;
  for (int i = 0; i < n; i++) {
    cin >> tx >> ty;
    arr[i] = {tx, ty};
  }
  for (int i = 0; i < n; i++) {
    if (arr[i].first >= sx) {
      rightPoints++;
    }
    if (arr[i].first <= sx) {
      leftPoints++;
    }
    if (arr[i].second >= sy) {
      upPoints++;
    }
    if (arr[i].second <= sy) {
      downPoints++;
    }
  }
  int maxx = max(max(leftPoints, rightPoints), max(upPoints, leftPoints));
  if (maxx == leftPoints) {
    cout << leftPoints << endl << sx - 1 << " " << sy << endl;
    return 0;
  }
  if (maxx == rightPoints) {
    cout << rightPoints << endl << sx + 1 << " " << sy << endl;
    return 0;
  }
  if (maxx == upPoints) {
    cout << upPoints << endl << sx << " " << sy + 1 << endl;
    return 0;
  }
  if (maxx == downPoints) {
    cout << leftPoints << endl << sx - 1 << " " << sy << endl;
    return 0;
  }
}
