#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
long long pow1(long long x, long long y) {
  long long res = 1;
  x = x % mod;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % mod;
    y = y >> 1;
    x = (x * x) % mod;
  }
  return res;
}
int main() {
  long long n, x, y, i, x1, y1, a = 0, b = 0, c = 0, d = 0;
  cin >> n >> x >> y;
  for (i = 0; i < n; i++) {
    cin >> x1 >> y1;
    if (x1 > x && y1 > y) d++, a++;
    if (x1 > x && y1 < y) a++, b++;
    if (x1 == x && y1 < y) b++;
    if (x1 == x && y1 > y) d++;
    if (x1 < x && y1 > y) c++, d++;
    if (x1 < x && y1 < y) b++, c++;
    if (y1 == y && x1 > x) a++;
    if (y1 == y && x1 < x) c++;
  }
  if (a >= b && a >= c && a >= d) {
    cout << a << endl;
    cout << (x + 1) << " " << y << endl;
  } else if (b >= a && b >= c && b >= d) {
    cout << b << endl;
    cout << x << " " << (y - 1) << endl;
  } else if (c >= a && c >= b && c >= d) {
    cout << c << endl;
    cout << (x - 1) << " " << y << endl;
  } else {
    cout << d << endl;
    cout << x << " " << (y + 1) << endl;
  }
  return 0;
}
