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 N = 2e5 + 3, Dx[4] = {0, 1, 0, -1}, Dy[4] = {1, 0, -1, 0};
int n, x[N], y[N], a, b, s[4], p;
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; i++) scanf("%d%d", x + i, y + i);
  for (int k = 0, aa, bb; k < 4; k++) {
    aa = a + Dx[k], bb = b + Dy[k];
    for (int i = 1; i <= n; i++)
      if ((x[i] <= aa && aa <= a || x[i] >= aa && aa >= a) &&
          (y[i] <= bb && bb <= b || y[i] >= bb && bb >= b))
        s[k]++;
    p = s[k] > s[p] ? k : p;
  }
  printf("%d\n%d %d", s[p], a + Dx[p], b + Dy[p]);
  return 0;
}
