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