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 mh(pair<int, int> a, pair<int, int> b) {
  return abs(a.first - b.first) + abs(a.second - b.second);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, sr, sc;
  cin >> n >> sr >> sc;
  vector<pair<int, int> > students;
  for (int i = 0; i < n; i++) {
    int r, c;
    cin >> r >> c;
    students.emplace_back(r, c);
  }
  int best_count = 0;
  int best_r = -1;
  int best_c = -1;
  for (int dr = -1; dr <= 1; dr++) {
    for (int dc = -1; dc <= 1; dc++) {
      if (dr == 0 && dc == 0) continue;
      int r = sr + dr;
      int c = sc + dc;
      if (r < 0 || r > 1e9 || c < 0 || c > 1e9) continue;
      int count = 0;
      for (const auto& s : students) {
        if (mh({sr, sc}, {r, c}) + mh({r, c}, s) == mh({sr, sc}, s)) {
          count++;
        }
      }
      if (count > best_count) {
        best_count = count;
        best_r = r;
        best_c = c;
      }
    }
  }
  cout << best_count << endl;
  cout << best_r << " " << best_c << endl;
}
