#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x, y, i, j, k, a, b;
  vector<pair<long long, long long>> v;
  cin >> n >> x >> y;
  for (i = 0; i < n; i++) {
    cin >> a >> b;
    v.push_back({a - x, b - y});
  }
  int m[3] = {0, 1, -1};
  int mm[3] = {0, 1, -1};
  long long mxcnt = 0, cnt = 0, ansx = 0, ansy = 0;
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      if (i == 0 && j == 0) continue;
      cnt = 0;
      for (k = 0; k < v.size(); k++) {
        if (abs(v[k].first) + abs(v[k].second) ==
            abs(v[k].first - m[i]) + abs(m[i]) + abs(v[k].second - mm[j]) +
                abs(mm[j]))
          cnt++;
      }
      if (cnt >= mxcnt) {
        mxcnt = cnt;
        ansx = m[i];
        ansy = mm[j];
      }
    }
  }
  cout << mxcnt << endl;
  cout << ansx + x << " " << ansy + y;
  return 0;
}
