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;
const long long MaxN = 2e5 + 10;
long long a[MaxN];
int main() {
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  int x, y;
  int sum[4] = {0};
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x < sx)
      sum[3]++;
    else if (x > sx)
      sum[1]++;
    if (y < sy)
      sum[2]++;
    else if (y > sy)
      sum[0]++;
  }
  if ((sum[0] >= sum[1]) && (sum[0] >= sum[2]) && (sum[0] >= sum[3])) {
    cout << sum[0] << endl;
    cout << sx << ' ' << sy + 1;
  } else if ((sum[1] >= sum[0]) && (sum[1] >= sum[2]) && (sum[1] >= sum[3])) {
    cout << sum[1] << endl;
    cout << sx + 1 << ' ' << sy;
  } else if ((sum[2] >= sum[0]) && (sum[2] >= sum[1]) && (sum[2] >= sum[3])) {
    cout << sum[2] << endl;
    cout << sx << ' ' << sy - 1;
  } else {
    cout << sum[3] << endl;
    cout << sx - 1 << ' ' << sy;
  }
  return 0;
}
