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;
int n, m, k, cnt, ans, sx, sy, x[200005], y[200005], ax, ay, dx[] = {0, 1, -1},
                                                             dy[] = {0, 1, -1};
void test(int tx, int ty) {
  if (tx < 0 || tx > 1000000000 || ty < 0 || ty > 1000000000) return;
  int cnt = 0;
  for (int i = (1); i <= (n); i++) {
    if (tx >= min(sx, x[i]) && tx <= max(sx, x[i]) && ty >= min(sy, y[i]) &&
        ty <= max(sy, y[i])) {
      cnt++;
    }
  }
  if (cnt > ans) {
    ax = tx;
    ay = ty;
    ans = cnt;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  scanf("%d %d %d", &n, &sx, &sy);
  for (int i = (1); i <= (n); i++) {
    scanf("%d %d", &x[i], &y[i]);
  }
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      if (i + j == 0) continue;
      test(sx + dx[i], sy + dy[j]);
    }
  }
  printf("%d\n%d %d\n", ans, ax, ay);
  return 0;
}
