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;
using P = pair<string, int>;
using ll = long long;
int main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  ll l = 0;
  ll r = 0;
  ll u = 0;
  ll d = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x <= sx - 1) l++;
    if (x >= sx + 1) r++;
    if (y <= sy - 1) d++;
    if (y >= sy + 1) u++;
  }
  ll ans = max(max(l, r), max(u, d));
  cout << ans << endl;
  if (ans == l)
    cout << sx - 1 << " " << sy << endl;
  else if (ans == r)
    cout << sx + 1 << " " << sy << endl;
  else if (ans == u)
    cout << sx << " " << sy - 1 << endl;
  else if (ans == d)
    cout << sx << " " << sy + 1 << endl;
}
