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>
#pragma GCC optimize(3)
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 2e5 + 10;
const long long mod = 1000000007;
const double eps = 1e-9;
const double PI = acos(-1);
template <typename T>
inline void read(T &a) {
  char c = getchar();
  T x = 0, f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  a = f * x;
}
int gcd(int a, int b) { return (b > 0) ? gcd(b, a % b) : a; }
int main() {
  int n, x, y;
  cin >> n >> x >> y;
  int num1 = 0, num2 = 0, num3 = 0, num4 = 0;
  for (int i = 1; i <= n; i++) {
    int a, b;
    cin >> a >> b;
    if (a < x) num1++;
    if (a > x) num2++;
    if (b < y) num3++;
    if (b > y) num4++;
  }
  int mx = max(max(num1, num2), max(num3, num4));
  if (mx == num1) {
    cout << mx << endl;
    cout << x - 1 << ' ' << y << endl;
  }
  if (mx == num2) {
    cout << mx << endl;
    cout << x + 1 << ' ' << y << endl;
  }
  if (mx == num3) {
    cout << mx << endl;
    cout << x << ' ' << y - 1 << endl;
  }
  if (mx == num4) {
    cout << mx << endl;
    cout << x << ' ' << y + 1 << endl;
  }
}
