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;
template <typename T>
void stmin(T &a, T b) {
  if (a > b) a = b;
}
template <typename T>
void stmax(T &a, T b) {
  if (a < b) a = b;
}
long long int solve() {
  long long int n, sx, sy;
  cin >> n >> sx >> sy;
  long long int x[n], y[n];
  for (long long int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    x[i] -= sx;
    y[i] -= sy;
  }
  sort(x, x + n);
  sort(y, y + n);
  long long int h, g, c = 0, hi, gi;
  if (x[0] >= 0) {
    hi = 0;
    h = n;
  } else if (x[n - 1] < 0) {
    hi = n - 1;
    h = n;
  } else {
    for (long long int i = 0; i < n; i++) {
      if (x[i] >= 0) {
        hi = i;
        break;
      }
    }
    if (hi > n - hi) {
      h = hi;
      hi--;
    } else {
      h = n - hi;
    }
  }
  if (y[0] >= 0) {
    gi = 0;
    g = n;
  } else if (y[n - 1] < 0) {
    gi = n - 1;
    g = n;
  } else {
    for (long long int i = 0; i < n; i++) {
      if (y[i] >= 0) {
        gi = i;
        break;
      }
    }
    if (gi > n - gi) {
      g = gi;
      gi--;
    } else {
      g = n - gi;
    }
  }
  if (h > g) {
    hi = x[hi] + sx;
    gi = sy;
    cout << h << "\n";
  } else {
    gi = y[gi] + sy;
    hi = sx;
    cout << g << "\n";
  }
  cout << hi << " " << gi;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int test = 1, c = 1;
  while (test--) {
    solve();
  }
}
