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 long long mod = 998244353;
const int N = 2e5 + 2;
int main() {
  int n, sx, sy;
  scanf("%d", &n);
  scanf("%d", &sx);
  scanf("%d", &sy);
  int l, r, u, d;
  l = r = u = d = 0;
  for (int i = 0; i < (int)n; i++) {
    int hx, hy;
    scanf("%d", &hx);
    scanf("%d", &hy);
    if (hx < sx) l++;
    if (hx > sx) r++;
    if (hy < sy) d++;
    if (hy > sy) u++;
  }
  int mx = max({l, r, u, d});
  if (mx == l) {
    printf("%d\n", (int)mx);
    printf("%d ", (int)sx - 1);
    printf("%d\n", (int)sy);
  } else if (mx == r) {
    printf("%d\n", (int)mx);
    printf("%d ", (int)sx + 1);
    printf("%d\n", (int)sy);
  } else if (mx == u) {
    printf("%d\n", (int)mx);
    printf("%d ", (int)sx);
    printf("%d\n", (int)sy + 1);
  } else if (mx == d) {
    printf("%d\n", (int)mx);
    printf("%d ", (int)sx);
    printf("%d\n", (int)sy - 1);
  }
  return 0;
}
