#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, sx, sy, x, y;
  cin >> n >> sx >> sy;
  vector<pair<long long int, long long int> > v;
  v.push_back({sx, sy + 1});
  v.push_back({sx, sy - 1});
  v.push_back({sx + 1, sy});
  v.push_back({sx - 1, sy});
  vector<long long int> answer(4, 0);
  for (long long int i = 1; i <= n; i++) {
    cin >> x >> y;
    long long int mnx = min(sx, x);
    long long int mxx = max(sx, x);
    long long int mny = min(sy, y);
    long long int mxy = max(sy, y);
    for (int j = 0; j < 4; j++) {
      if (v[j].first >= mnx && v[j].first <= mxx && v[j].second >= mny &&
          v[j].second <= mxy) {
        answer[j]++;
      }
    }
  }
  long long int ans = 0;
  for (int i = 0; i < 4; i++) ans = max(ans, answer[i]);
  cout << ans << endl;
  for (int i = 0; i < 4; i++) {
    if (answer[i] == ans && v[i].first <= 1e9 && v[i].second <= 1e9 &&
        v[i].first >= 0 && v[i].second >= 0) {
      cout << v[i].first << " " << v[i].second << endl;
      return 0;
    }
  }
  return 0;
}
