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 int maxn = 2e5 + 10;
int x[maxn], y[maxn];
bool cmp(int a, int b, int c, int d, int x, int y) {
  int xmin = min(a, c), xmax = max(a, c);
  int ymin = min(b, d), ymax = max(b, d);
  if (x >= xmin && x <= xmax && y >= ymin && y <= ymax) return 1;
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  int n, sx, sy;
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  int ans[20] = {0}, cnt = 0;
  for (int i = -1; i <= 1; i++) {
    for (int j = -1; j <= 1; j++) {
      cnt++;
      if (i == 0 && j == 0) continue;
      for (int k = 0; k < n; k++) {
        if (cmp(sx, sy, x[k], y[k], sx + i, sy + j) == 1) ans[cnt]++;
      }
    }
  }
  int maxn = 0;
  for (int i = 1; i < 10; i++) {
    if (ans[i] > ans[maxn]) maxn = i;
  }
  cout << ans[maxn] << endl;
  if (maxn <= 3) sx--;
  if (maxn >= 7) sx++;
  if (maxn % 3 == 1) sy--;
  if (maxn % 3 == 0) sy++;
  cout << sx << " " << sy << endl;
  return 0;
}
