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 int N = (int)100;
const int dx[] = {-1, 0, 1, 0, -1, -1, 1, 1};
const int dy[] = {0, 1, 0, -1, -1, 1, -1, 1};
char dir[] = {'L', 'D', 'R', 'U'};
const long long int mod = (long long int)1e9 + 7;
const long long int inf = 2e18 + 1000;
int BIT[100005], n;
long long int prime[17], spf[N];
template <typename T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <typename T>
T min3(T a, T b, T c) {
  return min(a, min(b, c));
}
template <typename T>
T max3(T a, T b, T c) {
  return max(a, max(b, c));
}
bool isVowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E')
    return true;
  return false;
}
long long int mInv(long long int a, long long int m) {
  long long int m0 = m;
  long long int y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long int q = a / m;
    long long int t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
long long int power(long long int x, long long int y) {
  long long int res = 1;
  x = x % mod;
  while (y > 0) {
    if (y & 1) res = (res * x) % mod;
    y = y >> 1;
    x = (x * x) % mod;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long Extendedgcd(long long a, long long b, long long *x, long long *y) {
  if (!a) {
    *x = 0;
    *y = 1;
    return b;
  }
  long long nx, ny;
  long long d = Extendedgcd(b % a, a, &nx, &ny);
  long long k = b / a;
  *y = nx;
  *x = -k * nx + ny;
  return d;
}
void update(int x, int delta) {
  if (!x) {
    BIT[x] += delta;
    return;
  }
  for (; x <= N; x += x & -x) BIT[x] += delta;
}
long long int query(int x) {
  long long int sum = BIT[0];
  for (; x > 0; x -= x & -x) sum += BIT[x];
  return sum;
}
void Sieve() {
  for (int i = 1; i <= N; i++) prime[i] = 1;
  prime[0] = 0;
  prime[1] = 0;
  for (long long int p = 2; p * p <= N; p++) {
    if (prime[p] == 1) {
      for (long long int i = p * p; i <= N; i += p) prime[i] = 0;
    }
  }
  for (int p = 3; p <= N; p++) prime[p] += prime[p - 1];
}
void sieve() {
  spf[1] = -1;
  for (int i = 2; i < N; i++) spf[i] = i;
  for (int i = 4; i < N; i += 2) spf[i] = 2;
  for (long long int i = 3; i * i < N; i++) {
    if (spf[i] == i) {
      for (long long int j = i * i; j < N; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
struct cmp {
  bool operator()(const pair<int, int> &x, const pair<int, int> &y) const {
    if (x.first != y.first) return x.first < y.first;
    return x.second > y.second;
  }
};
void gInput(int m, vector<int> adj[]) {
  int u, v;
  for (int i = 0; i < m; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
}
vector<long long int> fac;
void factorial() {
  int N = (int)1e5 + 100;
  fac.resize(N);
  fac[0] = 1;
  for (long long int i = 1; i < N; i++) {
    fac[i] = ((fac[i - 1] % mod) * i) % mod;
  }
}
long long int nCr(long long int n, long long int r) {
  long long int x = fac[n];
  long long int y = fac[r];
  long long int z = fac[n - r];
  long long int pr = ((y % mod) * (z % mod)) % mod;
  pr = mInv(pr, mod);
  long long int ncr = ((x % mod) * (pr % mod)) % mod;
  return ncr;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    int n;
    long long int x, y;
    cin >> n >> x >> y;
    long long int a, b;
    map<pair<long long int, long long int>, int> mp;
    for (int i = 0; i < n; i++) {
      cin >> a >> b;
      if (a > x)
        mp[{x + 1, y}]++;
      else if (a < x) {
        mp[{x - 1, y}]++;
      }
      if (b > y) {
        mp[{x, y + 1}]++;
      } else if (b < y) {
        mp[{x, y - 1}]++;
      }
    }
    long long int ans_x, ans_y;
    int cnt = 0;
    for (auto it : mp) {
      if (it.second > cnt) {
        cnt = it.second;
        ans_x = it.first.first;
        ans_y = it.first.second;
      }
    }
    cout << cnt << "\n";
    cout << ans_x << " " << ans_y << "\n";
  }
  return 0;
}
