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>
#pragma GCC optimize("O3")
constexpr auto INF = 9223372036854775807;
using namespace std;
inline int mex(unordered_set<int> st) {
  int m = 0;
  while (st.find(m) != st.end()) {
    m += 1;
  }
  return m;
}
inline int calculateGrundy(int n) {
  if (n == 1) return 0;
  unordered_set<int> mexi;
  for (int i = 1; i <= sqrt(n); i += 1) {
    if (n % i == 0) {
      if (n / i != n) mexi.insert(calculateGrundy(n / i));
      mexi.insert(calculateGrundy(i));
    }
  }
  return mex(mexi);
}
inline long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p);
}
long long int nCrModPFermat(long long int n, long long int r, long long int p) {
  if (r == 0) return 1;
  vector<long long int> fac(n + 1, 0);
  fac[0] = 1;
  for (long long int i = 1; i <= n; i++) fac[i] = fac[i - 1] * i % p;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
bool check(long long int a) {
  long long int count = 0;
  while (a % 2 == 0) {
    a /= 2;
    count += 1;
  }
  if (count > 1) return false;
  bool flag = true;
  for (long long int i = 3; i <= sqrt(a); i += 2) {
    if (a % i == 0) {
      flag = false;
      break;
    }
  }
  return flag;
}
long long int sum(long long int n) { return (n * (n + 1)) / 2; }
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long int n, sx, sy;
  cin >> n >> sx >> sy;
  map<long long int, long long int> area;
  area[0] = 0;
  area[1] = 0;
  area[2] = 0;
  area[3] = 0;
  for (long long int i = (long long int)0; i < (long long int)n; i += 1) {
    long long int x, y;
    cin >> x >> y;
    x -= sx;
    y -= sy;
    if (x >= 0 && y >= 0) area[0] += 1;
    if (x <= 0 && y >= 0) area[1] += 1;
    if (x <= 0 && y <= 0) area[2] += 1;
    if (x >= 0 && y <= 0) area[3] += 1;
  }
  unordered_map<long long int, long long int> mp;
  mp[0] = area[0] + area[1];
  mp[1] = area[1] + area[2];
  mp[2] = area[2] + area[3];
  mp[3] = area[0] + area[3];
  long long int maxi = max(mp[0], max(mp[1], max(mp[2], mp[3])));
  long long int ans = 0;
  for (auto i = mp.begin(); i != mp.end(); i++) {
    auto it = *i;
    if (it.second == maxi) {
      ans = it.first;
      break;
    }
  }
  cout << maxi << '\n';
  if (ans == 0) {
    cout << sx << " " << sy + 1 << '\n';
  } else if (ans == 1) {
    cout << sx - 1 << " " << sy << '\n';
  } else if (ans == 2) {
    cout << sx << " " << sy - 1 << '\n';
  } else {
    cout << sx + 1 << " " << sy << '\n';
  }
  return 0;
}
