#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;
}
