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;
inline void INP() {}
const long long inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
long long n, x, y, l, r, u, d;
string s;
vector<long long> adj[(long long)2e5 + 5];
long long vis[(long long)2e5 + 5], par[(long long)2e5 + 5],
    a[(long long)2e5 + 5];
void go() {
  cin >> n >> x >> y;
  for (long long i = 0; i < n; i++) {
    long long xx, yy;
    cin >> xx >> yy;
    if (xx <= x) ++l;
    if (xx >= x) ++r;
    if (yy <= y) ++d;
    if (yy >= y) ++u;
  }
  long long ans = max({l, u, d, r});
  cout << ans << '\n';
  if (ans == l)
    --x;
  else if (ans == r)
    ++x;
  else if (ans == d)
    --y;
  else
    ++y;
  cout << x << ' ' << y << '\n';
}
int32_t main() {
  INP();
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t = 1;
  while (t--) go();
}
