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;
using ll = long long int;
inline bool can_catch(int b1_x, int b1_y, int b2_x, int b2_y, int x, int y) {
  return min(b1_x, b2_x) <= x && x <= max(b1_x, b2_x) && min(b1_y, b2_y) <= y &&
         y <= max(b1_y, b2_y);
}
inline bool in_borders(int a) { return 0 <= a && a <= 1000 * 1000 * 1000; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, s_x, s_y;
  cin >> n >> s_x >> s_y;
  vector<pair<int, int>> h(n);
  for (int i = 0; i < n; ++i) cin >> h[i].first >> h[i].second;
  int ans = 0;
  int ans_x, ans_y;
  for (int dy = -1; dy < 2; ++dy)
    for (int dx = -1; dx < 2; ++dx)
      if ((dy != 0 || dx != 0) && in_borders(s_y + dy) &&
          in_borders(s_x + dx)) {
        int cnt = 0;
        for (pair<int, int> &p : h)
          if (can_catch(s_x, s_y, p.first, p.second, s_x + dx, s_y + dy)) ++cnt;
        if (ans < cnt) {
          ans = cnt;
          ans_x = s_x + dx;
          ans_y = s_y + dy;
        }
      }
  cout << ans << '\n' << ans_x << ' ' << ans_y;
  return 0;
}
