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 N = 2e5;
long long n, sx, sy, X[N], Y[N], dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0},
                                 res;
long long f(long long x, long long y) {
  long long c = 0;
  if (x < 0 || y < 0 || x > 1e9 || y > 1e9) return -1;
  for (long long i = 0; i < n; ++i)
    if (min(sx, X[i]) <= x && x <= max(sx, X[i]) && min(sy, Y[i]) <= y &&
        y <= max(sy, Y[i]))
      c++;
  return c;
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> sx >> sy;
  for (long long i = 0; i < n; ++i) cin >> X[i] >> Y[i];
  long long ax, ay;
  for (long long i = 0; i < 4; ++i) {
    if (f(sx + dx[i], sy + dy[i]) >= res) {
      res = f(sx + dx[i], sy + dy[i]);
      ax = sx + dx[i];
      ay = sy + dy[i];
    }
  }
  cout << res << '\n' << ax << ' ' << ay;
}
