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