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;
signed main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a, b;
  cin >> a >> b;
  vector<long long> x(n), y(n);
  vector<long long> ans(4, 0);
  long long ind = 0;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    cin >> x[i] >> y[i];
  }
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    if (x[i] < a && (y[i] <= b || y[i] >= b)) ans[ind]++;
  }
  ind++;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    if (y[i] < b && (x[i] >= a || x[i] <= a)) ans[ind]++;
  }
  ind++;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    if (x[i] > a && (y[i] >= b || y[i] <= b)) ans[ind]++;
  }
  ind++;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    if (y[i] > b && (x[i] >= a || x[i] <= b)) ans[ind]++;
  }
  vector<long long> c((ans).begin(), (ans).end());
  sort((c).begin(), (c).end());
  long long idx = -1;
  for (__typeof((long long)ans.size()) i =
           (0) - ((0) > ((long long)ans.size()));
       i != ((long long)ans.size()) - ((0) > ((long long)ans.size()));
       i += 1 - 2 * ((0) > ((long long)ans.size()))) {
    if (ans[i] == c[(long long)c.size() - 1]) {
      idx = i;
      break;
    }
  }
  if (idx == 0) {
    cout << ans[0] << '\n';
    cout << a - 1 << ' ' << b;
  } else if (idx == 1) {
    cout << ans[1] << '\n';
    cout << a << ' ' << b - 1;
  } else if (idx == 2) {
    cout << ans[2] << '\n';
    cout << a + 1 << ' ' << b;
  } else if (idx == 3) {
    cout << ans[3] << '\n';
    cout << a << ' ' << b + 1;
  }
}
