#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;
}
