#include <bits/stdc++.h>
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int exp(long long int x, long long int y) {
  long long int res = 1;
  x = x % 1000000007;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res;
}
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int n, sx, sy, x, y, i, j, t, mi;
  cin >> n >> sx >> sy;
  vector<pair<long long int, long long int>> v;
  for (i = sx - 1; i <= sx + 1; i++) {
    for (j = sy - 1; j <= sy + 1; j++) {
      if (i == sx && j == sy)
        continue;
      else if (i >= 0 && j >= 0)
        v.push_back(make_pair(i, j));
    }
  }
  vector<long long int> ans(v.size());
  for (long long int i = 0; i < n; i++) {
    cin >> x >> y;
    mi = abs(sx - x) + abs(sy - y);
    for (j = 0; j < v.size(); j++) {
      t = abs(x - v[j].first) + abs(y - v[j].second) + abs(sx - v[j].first) +
          abs(sy - v[j].second);
      if (t == mi) ans[j]++;
    }
  }
  i = max_element(ans.begin(), ans.end()) - ans.begin();
  cout << ans[i] << endl;
  cout << v[i].first << " " << v[i].second;
  return 0;
}
