#include <bits/stdc++.h>
using namespace std;
int north = 0, south = 0, east = 0, west = 0;
int n, sx, sy;
bool validate(int x, int y) {
  int val = 1e9;
  if (x < 0 || y < 0 || x > val || y > val)
    return false;
  else
    return true;
}
bool f(int x, int y, int home_to_school, int stud_x, int stud_y) {
  int shawarma_location = abs(x - stud_x) + abs(y - stud_y);
  if (shawarma_location <= home_to_school)
    return true;
  else
    return false;
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    int home_to_school = abs(sx - x) + abs(sy - y);
    if (validate(sx, sy + 1) && f(sx, sy + 1, home_to_school, x, y)) {
      north++;
    }
    if (validate(sx, sy - 1) && f(sx, sy - 1, home_to_school, x, y)) {
      south++;
    }
    if (validate(sx - 1, sy) && f(sx - 1, sy, home_to_school, x, y)) {
      west++;
    }
    if (validate(sx + 1, sy) && f(sx + 1, sy, home_to_school, x, y)) {
      east++;
    }
  }
  vector<int> v{north, east, west, south};
  sort(v.begin(), v.end());
  if (v[3] == north) {
    cout << north << "\n";
    cout << sx << " " << sy + 1 << "\n";
  } else if (v[3] == south) {
    cout << south << "\n";
    cout << sx << " " << sy - 1 << "\n";
  } else if (v[3] == west) {
    cout << west << "\n";
    cout << sx - 1 << " " << sy << "\n";
  } else {
    cout << east << "\n";
    cout << sx + 1 << " " << sy << "\n";
  }
  return 0;
}
