#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
void solve() {
  long long int n, sx, sy, x, y;
  cin >> n >> sx >> sy;
  vector<long long int> dx = {-1, 1, 0, 0};
  vector<long long int> dy = {0, 0, 1, -1};
  vector<long long int> ans(4);
  for (long long int i = 0; i < n; i++) {
    cin >> x >> y;
    long long int dist = abs(sx - x) + abs(sy - y);
    for (long long int j = 0; j < 4; j++) {
      long long int xx, yy;
      xx = sx + dx[j];
      yy = sy + dy[j];
      if (abs(xx - sx) + abs(xx - x) + abs(yy - y) + abs(yy - sy) == dist)
        ans[j]++;
    }
  }
  long long int j = 0;
  for (long long int i = 0; i < 4; i++)
    if (ans[i] > ans[j]) j = i;
  cout << ans[j] << endl;
  cout << sx + dx[j] << " " << sy + dy[j] << endl;
}
void debug(long long int tt) {}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
}
