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;
};
int n, w, b, u, d, l, r;
Point s, p[300000];
int main() {
  cin >> n >> s.x >> s.y;
  for (int i = 0; i < n; ++i) {
    cin >> p[i].x >> p[i].y;
    if (p[i].x > s.x) {
      r++;
    }
    if (p[i].x < s.x) {
      l++;
    }
    if (p[i].y > s.y) {
      u++;
    }
    if (p[i].y < s.y) {
      d++;
    }
  }
  if (r >= l && r >= u && r >= d) {
    cout << r << endl << s.x + 1 << " " << s.y;
  } else if (l >= r && l >= u && l >= d) {
    cout << l << endl << s.x - 1 << " " << s.y;
  } else if (u >= r && u >= l && u >= d) {
    cout << u << endl << s.x << " " << s.y + 1;
  } else if (d >= r && d >= l && d >= u) {
    cout << u << endl << s.x << " " << s.y - 1;
  }
  return 0;
}
