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;
pair<int, int> second;
vector<pair<int, int>> pts;
int dist(pair<int, int> p1, pair<int, int> p2) {
  return abs(p1.first - p2.first) + abs(p1.second - p2.second);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> second.first >> second.second;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    pts.push_back({x, y});
  }
  vector<pair<int, int>> pos;
  pos.push_back({second.first + 1, second.second});
  pos.push_back({second.first - 1, second.second});
  pos.push_back({second.first, second.second + 1});
  pos.push_back({second.first, second.second - 1});
  vector<int> res(4, 0);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < 4; ++j) {
      if (dist(pos[j], pts[i]) < dist(second, pts[i])) {
        res[j]++;
      }
    }
  }
  int p = 0;
  for (int i = 0; i < 4; ++i) {
    if (res[i] > res[p]) {
      p = i;
    }
  }
  cout << res[p] << "\n";
  cout << pos[p].first << " " << pos[p].second;
  return 0;
}
