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 = 200100;
int n, x[N], y[N], sx, sy, cnt1, cnt2, cnt3, cnt4, mx;
int main() {
  scanf("%d%d%d", &n, &sx, &sy);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
    x[i] -= sx;
    y[i] -= sy;
  }
  for (int i = 1; i <= n; i++) {
    if (y[i] >= 1) cnt1++;
    if (y[i] <= -1) cnt2++;
    if (x[i] >= 1) cnt3++;
    if (x[i] <= -1) cnt4++;
  }
  mx = max({cnt1, cnt2, cnt3, cnt4});
  printf("%d\n", mx);
  if (cnt1 == mx) {
    printf("%d %d\n", sx, sy + 1);
    return 0;
  }
  if (cnt2 == mx) {
    printf("%d %d\n", sx, sy - 1);
    return 0;
  }
  if (cnt3 == mx) {
    printf("%d %d\n", sx + 1, sy);
    return 0;
  }
  if (cnt4 == mx) {
    printf("%d %d\n", sx - 1, sy);
    return 0;
  }
}
