#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
struct Node {
  int x, y;
} w[N];
int main() {
  register int n, sx, sy;
  register int l, r, u, d;
  l = r = u = d = 0;
  scanf("%d %d %d", &n, &sx, &sy);
  for (register int i = 1; i <= n; ++i) {
    scanf("%d %d", &w[i].x, &w[i].y);
    if (w[i].x < sx) ++l;
    if (w[i].x > sx) ++r;
    if (w[i].y > sy) ++u;
    if (w[i].y < sy) ++d;
  }
  register int p = max(max(max(l, r), u), d);
  if (l == p)
    printf("%d\n%d %d\n", p, sx - 1, sy);
  else if (r == p)
    printf("%d\n%d %d\n", p, sx + 1, sy);
  else if (u == p)
    printf("%d\n%d %d\n", p, sx, sy + 1);
  else
    printf("%d\n%d %d\n", p, sx, sy - 1);
  return 0;
}
