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 main() {
  int n;
  int x, y;
  cin >> n >> x >> y;
  int up = 0;
  int down = 0;
  int left = 0;
  int right = 0;
  for (int i = 1; i <= n; i++) {
    int xx, yy;
    cin >> xx >> yy;
    if (xx > x) right++;
    if (xx < x) left++;
    if (yy > y) up++;
    if (yy < y) down++;
  }
  int xxx = 0, yyy = 0;
  int xmm, ymm;
  if (right < left)
    xxx = -1;
  else
    xxx = 1;
  xmm = max(right, left);
  if (up > down)
    yyy = 1;
  else
    yyy = -1;
  ymm = max(up, down);
  if (ymm > xmm) {
    xxx = 0;
    printf("%d\n", ymm);
    printf("%d %d", x + xxx, y + yyy);
  } else {
    yyy = 0;
    printf("%d\n", xmm);
    printf("%d %d", x + xxx, y + yyy);
  }
}
