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 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;
}
int main(void) {
  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 << endl;
    cout << sx << " " << sy + 1 << endl;
  } else if (v[3] == south) {
    cout << south << endl;
    cout << sx << " " << sy - 1 << endl;
  } else if (v[3] == west) {
    cout << west << endl;
    cout << sx - 1 << " " << sy << endl;
  } else {
    cout << east << endl;
    cout << sx + 1 << " " << sy << endl;
  }
  return 0;
}
