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;
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;
}
