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 mod = int(1e9 + 7);
const int N = int(2e6 + 7);
bool sec(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.first == b.first)
    return (a.second < b.second);
  else {
    return (a.first < b.first);
  }
}
bool sortbysecdesc(const pair<int, int> &a, const pair<int, int> &b) {
  return a.second > b.second;
}
long long primeFactors(long long n) {
  long long cnt = 0;
  while (n % 2 == 0) {
    n = n / 2;
  }
  for (long long i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      cnt++;
      n = n / i;
    }
  }
  if (n > 2) cnt++;
  return cnt;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, h, i, j, len = 0, f = 0, a = 0, b = 0, c = 0, d = 0, x1, y1, l,
                        r, x, y, u = 0, v = 0;
  cin >> n >> x >> y;
  for (i = 0; i < n; i++) {
    cin >> x1 >> y1;
    if (x1 > x) a++;
    if (x1 < x) b++;
    if (y1 < y) c++;
    if (y1 > y) d++;
  }
  if (max(a, b) >= max(c, d)) {
    if (a >= b) l = x + 1, r = y;
    if (a < b) l = x - 1, r = y;
  } else {
    if (c >= d) l = x, r = y - 1;
    if (c < d) l = x, r = y + 1;
  }
  x = max(max(a, b), max(c, d));
  cout << x << endl;
  cout << l << " " << r << endl;
}
