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