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;
constexpr auto inf = 1e9;
constexpr auto eps = 1e-9;
struct pt {
  int x, y;
} p;
void solve() {
  int n;
  pt S;
  cin >> n >> S.x >> S.y;
  int u = 0, d = 0, l = 0, r = 0;
  for (int i = 0; i < n; i++) {
    cin >> p.x >> p.y;
    if (p.x > S.x) r++;
    if (p.x < S.x) l++;
    if (p.y > S.y) u++;
    if (p.y < S.y) d++;
  }
  if (S.x + 1 > 1e9) r = 0;
  if (S.x - 1 < 0) l = 0;
  if (S.y + 1 > 1e9) u = 0;
  if (S.x - 1 < 0) d = 0;
  if (r > l && r > u && r > d) {
    cout << r << '\n';
    cout << S.x + 1 << ' ' << S.y;
  } else if (l >= r && l >= u && l >= d) {
    cout << l << '\n';
    cout << S.x - 1 << ' ' << S.y;
  } else if (u >= l && u >= r && u >= d) {
    cout << u << '\n';
    cout << S.x << ' ' << S.y + 1;
  } else if (d >= l && d >= u && d >= u) {
    cout << d << '\n';
    cout << S.x << ' ' << S.y - 1;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
}
