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;
void solve() {
  long long int n, sx, sy, a, b, hleft = 0, hright = 0, vup = 0, vdown = 0,
                                 f = 0, s = 0, t = 0, fo = 0;
  vector<pair<int, int> > cord;
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    cord.push_back(make_pair(a, b));
  }
  for (auto i : cord) {
    if (i.first == sx)
      i.second > sy ? vup++ : vdown++;
    else if (i.second == sy)
      i.first > sx ? hright++ : hleft++;
    else if (i.first > sx && i.second > sy)
      f++;
    else if (i.first < sx && i.second > sy)
      s++;
    else if (i.first < sx && i.second < sy)
      t++;
    else
      fo++;
  }
  if (f > s && f > t && f > fo) {
    if (hright > vup) {
      cout << f + hright << '\n';
      cout << sx + 1 << " " << sy << '\n';
    } else {
      cout << f + vup << '\n';
      cout << sx << " " << sy + 1 << '\n';
    }
  } else if (s > t && s > fo) {
    if (hleft > vup) {
      cout << s + hleft << '\n';
      cout << sx - 1 << " " << sy << '\n';
    } else {
      cout << s + vup << '\n';
      cout << sx << " " << sy + 1 << '\n';
    }
  } else if (t > fo) {
    if (hleft > vdown) {
      cout << t + hleft << '\n';
      cout << sx - 1 << " " << sy << '\n';
    } else {
      cout << t + vdown << '\n';
      cout << sx << " " << sy - 1 << '\n';
    }
  } else {
    if (hright > vdown) {
      cout << hright + fo << '\n';
      cout << sx + 1 << " " << sy << '\n';
    } else {
      cout << vdown + fo << '\n';
      cout << sx << " " << sy - 1 << '\n';
    }
  }
  return;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
