#include <bits/stdc++.h>
using namespace std;
void weza() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
bool is_num(char c) {
  if (c >= '0' && c <= '9') return true;
  return false;
}
int main() {
  weza();
  long long n, x, y, right = 0, left = 0, up = 0, down = 0, a, b;
  cin >> n >> x >> y;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    if (a > x) right++;
    if (a < x) left++;
    if (b > y) up++;
    if (b < y) down++;
  }
  long long mx = max({right, left, up, down});
  cout << mx << endl;
  if (mx == right)
    cout << x + 1 << " " << y << endl;
  else if (mx == left)
    cout << x - 1 << " " << y << endl;
  else if (mx == up)
    cout << x << " " << y + 1 << endl;
  else if (mx == down)
    cout << x << " " << y - 1 << endl;
}
