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 x[200005], y[200005];
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int main() {
  int n, sx, sy, i, j;
  scanf("%d", &n), scanf("%d", &sx), scanf("%d", &sy);
  for (i = 0; i < n; i++) scanf("%d", &x[i]), scanf("%d", &y[i]);
  int cnt[4]{};
  for (i = 0; i < n; i++) {
    if (x[i] >= sx + dx[0]) cnt[0]++;
    if (x[i] <= sx + dx[2]) cnt[2]++;
    if (y[i] >= sy + dy[1]) cnt[1]++;
    if (y[i] <= sy + dy[3]) cnt[3]++;
  }
  int mx = 0, id = -1;
  for (i = 0; i < 4; i++)
    if (mx < cnt[i]) {
      id = i;
      mx = cnt[i];
    }
  printf("%d\n", mx);
  printf("%d %d\n", sx + dx[id], sy + dy[id]);
  return 0;
}
