#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, sx, sy, i, x, y;
  vector<long long> v(4, 0);
  cin >> n >> sx >> sy;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    if (y < sy) v[0]++;
    if (x > sx) v[1]++;
    if (y > sy) v[2]++;
    if (x < sx) v[3]++;
  }
  long long maxin = 0;
  for (i = 0; i < 4; i++) {
    if (v[i] > v[maxin]) maxin = i;
  }
  cout << v[maxin] << '\n';
  if (maxin == 0)
    cout << sx << " " << sy - 1;
  else if (maxin == 1)
    cout << sx + 1 << " " << sy;
  else if (maxin == 2)
    cout << sx << " " << sy + 1;
  else if (maxin == 3)
    cout << sx - 1 << " " << sy;
  return 0;
}
