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;
struct point {
  int x, y;
};
bool isLeft(point p1, point p2) { return p1.x < p2.x; }
bool isRight(point p1, point p2) { return p1.x > p2.x; }
bool isAbove(point p1, point p2) { return p1.y < p2.y; }
bool isBelow(point p1, point p2) { return p1.y > p2.y; }
int main() {
  int n;
  cin >> n;
  struct point school;
  cin >> school.x >> school.y;
  struct point house[n];
  for (int i = 0; i < n; i++) cin >> house[i].x >> house[i].y;
  int l, r, a, b;
  l = r = a = b = 0;
  for (int i = 0; i < n; i++) {
    if (isLeft(house[i], school)) l++;
    if (isRight(house[i], school)) r++;
    if (isAbove(house[i], school)) a++;
    if (isBelow(house[i], school)) b++;
  }
  int m = max({l, r, a, b});
  cout << m << "\n";
  if (m == l) {
    cout << school.x - 1 << " " << school.y << "\n";
  } else if (m == r) {
    cout << school.x + 1 << " " << school.y << "\n";
  } else if (m == a) {
    cout << school.x << " " << school.y - 1 << "\n";
  } else if (m == b) {
    cout << school.x << " " << school.y + 1 << "\n";
  }
  return 0;
}
