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 a, b, c, d, e, f;
int main() {
  int n, sx, sy, x, y, p[5] = {0, 0, 0, 0, 0};
  scanf("%d%d%d", &n, &sx, &sy);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x, &y);
    if (x < sx) p[1]++;
    if (y > sy) p[2]++;
    if (x > sx) p[3]++;
    if (y < sy) p[4]++;
  }
  int mx = max(max(p[1], p[2]), max(p[3], p[4]));
  int nx[5] = {0, -1, 0, 1, 0};
  int ny[5] = {0, 0, 1, 0, -1};
  for (int i = 1; i <= 4; i++) {
    if (p[i] == mx) {
      x = sx + nx[i];
      y = sy + ny[i];
      printf("%d\n%d %d", mx, x, y);
      break;
    }
  }
  return 0;
}
