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 check(int* a, int n) {
  for (int i = 0; i < n; i++)
    if (a[i] == 0) return i;
  return -1;
}
int main() {
  int n;
  cin >> n;
  int sx, sy;
  cin >> sx >> sy;
  int x[n], y[n];
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++) {
    x[i] = x[i] - sx;
    y[i] = y[i] - sy;
  }
  int a1 = 0, a2 = 0, a3 = 0, a4 = 0;
  for (int i = 0; i < n; i++) {
    if (x[i] >= 0 && y[i] >= 0) a1++;
    if (x[i] < 0 && y[i] >= 0) a2++;
    if (x[i] < 0 && y[i] < 0) a3++;
    if (x[i] >= 0 && y[i] < 0) a4++;
  }
  int px, py;
  int s1 = a1 + a2, s2 = a2 + a3, s3 = a3 + a4, s4 = a4 + a1;
  int smax = max(max(max(s1, s2), s3), s4);
  if (smax == s1) {
    px = sx;
    py = sy + 1;
  } else if (smax == s2) {
    px = sx - 1;
    py = sy;
  } else if (smax == s3) {
    px = sx;
    py = sy - 1;
  } else {
    px = sx + 1;
    py = sy;
  }
  printf("%d\n%d %d", smax, px, py);
}
