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() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int x, y;
  cin >> x >> y;
  int a, b;
  int up = 0, down = 0, right = 0, left = 0;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    if (a > x) {
      right++;
      if (b > y) {
        up++;
      } else if (b < y) {
        down++;
      }
    } else if (a < x) {
      left++;
      if (b > y) {
        up++;
      } else if (b < y) {
        down++;
      }
    } else {
      if (b > y)
        up++;
      else if (b < y) {
        down++;
      }
    }
  }
  int m = max(up, max(down, max(left, right)));
  cout << m << "\n";
  if (up == m)
    cout << x << " " << y + 1;
  else if (down == m)
    cout << x << " " << y - 1;
  else if (left == m)
    cout << x - 1 << " " << y;
  else
    cout << x + 1 << " " << y;
  return 0;
}
