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;
long long poww(long long a, long long b, long long md) {
  return (!b ? 1
             : (b & 1 ? a * poww(a * a % md, b / 2, md) % md
                      : poww(a * a % md, b / 2, md) % md));
}
const long long MAXN = 1e6 + 10;
const long long LOG = 22;
const long long INF = 8e18;
const long long MOD = 1e9 + 7;
long long n, sx, sy;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> sx >> sy;
  map<pair<long long, long long>, long long> mp;
  mp.insert({{1, 0}, 0});
  mp.insert({{0, 1}, 0});
  mp.insert({{0, -1}, 0});
  mp.insert({{-1, 0}, 0});
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    x -= sx;
    y -= sy;
    if (x > 0) mp[{1, 0}]++;
    if (x < 0) mp[{-1, 0}]++;
    if (y > 0) mp[{0, 1}]++;
    if (y > 0) mp[{0, -1}]++;
  }
  pair<pair<long long, long long>, long long> p;
  p.second = 0;
  for (pair<pair<long long, long long>, long long> e : mp) {
    if (e.second > p.second) {
      p = e;
    }
  }
  cout << p.second << '\n';
  cout << sx + p.first.first << " " << p.first.second + sy << '\n';
  return 0;
}
