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