#include <bits/stdc++.h>
using namespace std;
long long int binpow(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 binpow(n, p - 2, p);
}
const long long int INF = 1000000000000;
vector<long long int> pr;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, n, m, k, i, j, x, l, r, h, f, e, c, y;
  long long int t1, t2, t3, ans, temp;
  t = 1;
  while (t--) {
    cin >> n >> x >> y;
    long long int cnt[4] = {0};
    vector<pair<long long int, long long int>> v(n);
    for (i = 0; i < n; ++i) {
      cin >> v[i].first >> v[i].second;
      if (v[i].first < x)
        cnt[0]++;
      else if (v[i].first > x)
        cnt[1]++;
      if (v[i].second < y)
        cnt[2]++;
      else if (v[i].second > y)
        cnt[3]++;
    }
    j = -1;
    ans = 0;
    for (i = 0; i < 4; ++i) {
      if (cnt[i] > ans) {
        ans = cnt[i];
        j = i;
      }
    }
    long long int dx[] = {-1, 1, 0, 0};
    long long int dy[] = {0, 0, -1, 1};
    cout << ans << endl;
    cout << x + dx[j] << " " << y + dy[j] << endl;
  }
  return 0;
}
