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 n, sx, sy, ans, idx, idy;
vector<pair<int, int> > x;
int dis(int x1, int y1, int x2, int y2) {
  return (abs(x1 - x2) + abs(y1 - y2));
}
int main() {
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    x.push_back({a, b});
  }
  for (int i = -1; i < 2; i++) {
    for (int j = -1; j < 2; j++) {
      if (i == j && i == 0) continue;
      if (sx + i < 0 || sy + j < 0) continue;
      int cn = dis(sx, sy, sx + i, sy + j);
      int cnt = 0;
      for (int f = 0; f < n; f++) {
        int x1 = x[f].first, y1 = x[f].second;
        if (dis(x1, y1, sx, sy) == cn + dis(x1, y1, sx + i, sy + j)) cnt++;
      }
      if (ans < cnt) {
        ans = cnt;
        idx = sx + i;
        idy = sy + j;
      }
    }
  }
  cout << ans << '\n' << idx << ' ' << idy;
  return 0;
}
