#include <bits/stdc++.h>
using namespace std;
const long long N = 500010;
long long n, sx, sy, x, y, res[6];
int main() {
  scanf("%lld", &n);
  scanf("%lld%lld", &sx, &sy);
  for (int i = 0; i < n; i++) {
    scanf("%lld%lld", &x, &y);
    if (x < sx) res[1]++;
    if (y < sy) res[2]++;
    if (x > sx) res[3]++;
    if (y > sy) res[4]++;
  }
  long long mx = 0;
  for (int i = 1; i <= 4; i++) mx = max(mx, res[i]);
  for (int i = 1; i <= 4; i++) {
    if (mx == res[i]) {
      long long a, b;
      if (i == 1) {
        a = sx - 1, b = sy;
      } else if (i == 2) {
        a = sx, b = sy - 1;
      } else if (i == 3) {
        a = sx + 1, b = sy;
      } else
        a = sx, b = sy + 1;
      printf("%lld\n", mx);
      printf("%lld %lld", a, b);
      return 0;
    }
  }
  return 0;
}
