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>
const int mx = 1e6 + 5;
const int inf = 0x3f3f3f3f;
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, x, y, a = 0, b = 0, c = 0, d = 0;
  scanf("%d%d%d", &n, &x, &y);
  for (int i = 0; i < n; ++i) {
    int x1, y1;
    scanf("%d%d", &x1, &y1);
    if (x1 > x) ++a;
    if (x1 < x) ++b;
    if (y1 > y) ++c;
    if (y1 < y) ++d;
  }
  int ans = max(max(a, b), max(c, d));
  printf("%d\n", ans);
  if (ans == a)
    printf("%d %d\n", x + 1, y);
  else if (ans == b)
    printf("%d %d\n", x - 1, y);
  else if (ans == c)
    printf("%d %d\n", x, y + 1);
  else
    printf("%d %d\n", x, y - 1);
  return 0;
}
