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 xpow(long long int a, long long int b) {
  if (b == 0) return 1;
  if (b % 2 == 0) {
    long long int k = xpow(a, b / 2);
    return k * k;
  }
  if (b % 2 != 0) return a * xpow(a, b - 1);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, sx, sy;
  cin >> n >> sx >> sy;
  vector<pair<int, int>> v;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    v.push_back({x, y});
  }
  vector<pair<int, int>> point;
  point.push_back({sx + 1, sy});
  point.push_back({sx, sy + 1});
  point.push_back({sx - 1, sy});
  point.push_back({sx, sy - 1});
  int c = 0;
  vector<pair<int, pair<int, int>>> ans;
  for (auto p : point) {
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      int xt, yt;
      xt = v[i].first;
      yt = v[i].second;
      if (min(sx, xt) <= p.first <= max(sx, xt) and
          min(sy, yt) <= p.second <= max(sy, yt))
        cnt++;
    }
    ans.push_back({cnt, p});
  }
  sort(ans.rbegin(), ans.rend());
  cout << ans[0].first << endl;
  cout << ans[0].second.first << " " << ans[0].second.second << endl;
  return 0;
}
