#include <bits/stdc++.h>
using namespace std;
long long int cnt[4];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int i, j, n, sx, sy;
  vector<pair<long long int, long long int> > poss;
  cin >> n >> sx >> sy;
  if (sx - 1 >= 0) poss.push_back({sx - 1, sy});
  if (sx + 1 <= 1e9) poss.push_back({sx + 1, sy});
  if (sy - 1 >= 0) poss.push_back({sx, sy - 1});
  if (sy + 1 <= 1e9) poss.push_back({sx, sy + 1});
  memset(cnt, 0, sizeof cnt);
  for (i = 0; i < n; i++) {
    long long int x, y;
    cin >> x >> y;
    long long int school = abs(x - sx) + abs(y - sy);
    for (j = 0; j < (int)((poss).size()); j++) {
      auto it = poss[j];
      if (school == abs(it.first - x) + abs(it.second - y) +
                        abs(it.first - sx) + abs(it.second - sy))
        cnt[j]++;
    }
  }
  long long int maxx = max_element(cnt, cnt + 4) - cnt;
  for (i = 0; i < 4; i++) {
    if (i == maxx) {
      cout << (*max_element(cnt, cnt + 4)) << "\n";
      cout << poss[i].first << " " << poss[i].second;
      return 0;
    }
  }
  return 0;
}
