#include <bits/stdc++.h>
const double eps = 1e-6;
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 5;
using namespace std;
int x, y;
int t, n, m, s = 0;
int a = 0, b = 0, c = 0, d = 0;
int main() {
  scanf("%d%d%d", &n, &x, &y);
  while (n--) {
    scanf("%d%d", &t, &m);
    if (t < x)
      a++;
    else if (t > x)
      c++;
    if (m < y)
      d++;
    else if (m > y)
      b++;
  }
  s = max(max(a, b), max(c, d));
  printf("%d\n", s);
  if (s == a) {
    printf("%d %d\n", x - 1, y);
  } else if (s == b) {
    printf("%d %d\n", x, y + 1);
  } else if (s == c) {
    printf("%d %d\n", x + 1, y);
  } else {
    printf("%d %d\n", x, y - 1);
  }
  return 0;
}
