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() {
  int max1 = 0, max2 = 0, max3 = 0, max4 = 0;
  int min1 = 0, min2 = 0, min3 = 0, min4 = 0;
  int n, sx, sy;
  cin >> n >> sx >> sy;
  int x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x > sx) {
      max1 = max1 + 1;
      continue;
    }
    if (y > sy) {
      max2 = max2 + 1;
      continue;
    }
    if (x < sx) {
      max3 = max3 + 1;
      continue;
    }
    if (y < sy) {
      max4 = max4 + 1;
      continue;
    }
  }
  int maxi = max(max(max1, max2), max(max3, max4));
  cout << maxi << endl;
  if (maxi == max1) {
    cout << sx + 1 << " " << sy;
  } else if (maxi == max2) {
    cout << sx << " " << sy + 1;
  } else if (maxi == max3)
    cout << sx - 1 << " " << sy;
  else
    cout << sx << " " << sy - 1;
  return 0;
}
