#include <bits/stdc++.h>
using namespace std;
int n, sx, sy;
vector<pair<int, int> > stu;
pair<int, int> answer;
int now = 0;
void check(pair<int, int> tar, bool pos, bool big) {
  int temp = 0;
  for (int i = 0; i < stu.size(); i++) {
    if (big && pos) {
      if (tar.first >= stu[i].first) {
        temp++;
      }
    } else if (big && !pos) {
      if (tar.second >= stu[i].second) {
        temp++;
      }
    } else if (!big && pos) {
      if (tar.first <= stu[i].first) {
        temp++;
      }
    } else if (!big && !pos) {
      if (tar.second <= stu[i].second) {
        temp++;
      }
    }
  }
  if (now < temp) {
    now = temp;
    answer = tar;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) {
    pair<int, int> p;
    cin >> p.first >> p.second;
    stu.push_back(p);
  }
  check({sx - 1, sy}, 1, 1);
  check({sx, sy - 1}, 0, 1);
  check({sx + 1, sy}, 1, 0);
  check({sx, sy + 1}, 0, 0);
  cout << now << '\n';
  cout << answer.first << ' ' << answer.second << '\n';
}
