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 n, sx, sy;
  cin >> n >> sx >> sy;
  vector<int> x;
  vector<int> y;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    x.push_back(a);
    y.push_back(b);
  }
  int up = 0;
  int down = 0;
  int left = 0;
  int right = 0;
  if (n == 1) {
    cout << "1" << endl;
    cout << x[0] << " " << y[0] << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (sy > y[i]) {
      down++;
    } else {
      up++;
    }
    if (sx > x[i]) {
      left++;
    } else {
      right++;
    }
  }
  int ans = max(max(down, up), max(left, right));
  cout << ans << endl;
  if (ans == down) {
    cout << sx << " " << sy - 1 << endl;
  } else if (ans == left) {
    cout << sx - 1 << " " << sy << endl;
  } else if (ans == up) {
    cout << sx << " " << sy + 1 << endl;
  } else if (ans == right) {
    cout << sx + 1 << " " << sy << endl;
  }
  return 0;
}
