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>
long long mod = 1000000007;
long long mod2 = 998244353;
long long OO = 1e18;
long long david_villa_pow(long long x, long long n) {
  if (n == 0) return 1;
  long long u = david_villa_pow(x, n / 2);
  u = ((u % mod2) * (u % mod2)) % mod2;
  if (n % 2 == 1) u = ((u % mod2) * (x % mod2)) % mod2;
  return u;
}
long long up(long long x, long long y) {
  if (x % y == 0) return x / y;
  return x / y + 1;
}
using namespace std;
pair<long long, long long> p[200200];
long long n;
long long Ans = 0;
pair<long long, long long> ans;
void El_MaraVilla(long long x, long long y, bool u, bool d, bool l, bool r) {
  long long res = 0, i;
  for (i = 0; i < n; i++) {
    if (d && r) {
      if (x <= p[i].first && y >= p[i].second) res++;
    } else if (d && l) {
      if (x >= p[i].first && y >= p[i].second) res++;
    } else if (u && r) {
      if (x <= p[i].first && y <= p[i].second) res++;
    } else if (u && l) {
      if (x >= p[i].first && y <= p[i].second) res++;
    } else if (u) {
      if (y <= p[i].second) res++;
    } else if (d) {
      if (y >= p[i].second) res++;
    } else if (l) {
      if (x >= p[i].first) res++;
    } else {
      if (x <= p[i].first) res++;
    }
  }
  if (res > Ans) {
    Ans = res;
    ans = {x, y};
  }
}
int main() {
  long long i, j;
  ;
  long long sx, sy;
  cin >> n >> sx >> sy;
  for (i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  El_MaraVilla(sx - 1, sy + 1, 1, 0, 1, 0);
  El_MaraVilla(sx, sy + 1, 1, 0, 0, 0);
  El_MaraVilla(sx + 1, sy + 1, 1, 0, 0, 1);
  El_MaraVilla(sx - 1, sy, 0, 0, 1, 0);
  El_MaraVilla(sx + 1, sy, 0, 0, 0, 1);
  El_MaraVilla(sx - 1, sy - 1, 0, 1, 1, 0);
  El_MaraVilla(sx, sy - 1, 0, 1, 0, 0);
  El_MaraVilla(sx + 1, sy - 1, 0, 1, 0, 1);
  cout << Ans << endl;
  cout << ans.first << " " << ans.second << endl;
  return 0;
}
