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;
const long long MN = 200005;
long long n, sx, sy, px, py, ans;
pair<long long, long long> a[MN];
void check(long long x, long long y) {
  long long ret = 0;
  for (long long i = 1; i <= n; i++) {
    long long l = min(0ll, a[i].first), r = max(0ll, a[i].first);
    long long b = min(0ll, a[i].second), t = max(0ll, a[i].second);
    if (l <= x && x <= r && b <= y && y <= t) ret++;
  }
  if (ret >= ans) ans = ret, px = x, py = y;
}
int32_t main() {
  cin.tie(0), cin.sync_with_stdio(0);
  cin >> n >> sx >> sy;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i].first >> a[i].second;
    a[i].first -= sx, a[i].second -= sy;
  }
  check(0, -1);
  check(0, 1);
  check(-1, 0);
  check(1, 0);
  printf("%lld\n%lld %lld\n", ans, px + sx, py + sy);
  return 0;
}
