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