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