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;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long findGCD(long long arr[], long long n) {
  long long result = arr[0];
  for (long long i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  int up = 0;
  int down = 0;
  int left = 0;
  int right = 0;
  while (n--) {
    int x, y;
    cin >> x >> y;
    if (x < sx) {
      left++;
    } else if (x > sx) {
      right++;
    } else if (y > sy) {
      up++;
    } else if (y < sy) {
      down++;
    }
  }
  int maxi = max(left, max(right, max(up, down)));
  if (maxi == left) {
    cout << maxi << endl;
    cout << sx - 1 << " " << sy << endl;
  } else if (maxi == right) {
    cout << maxi << endl;
    cout << sx + 1 << " " << sy << endl;
  } else if (maxi == up) {
    cout << maxi << endl;
    cout << sx << " " << sy + 1 << endl;
  } else if (maxi == down) {
    cout << maxi << endl;
    cout << sx << " " << sy - 1 << endl;
  }
}
