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 OJ() {}
void solve() {
  long long n, x, y, a, b;
  cin >> n >> x >> y;
  long long ans[4] = {};
  for (long long i = 0; i < n; ++i) {
    cin >> a >> b;
    if (a > x)
      ans[0]++;
    else if (a < x)
      ans[2]++;
    if (b > y)
      ans[1]++;
    else if (b < y)
      ans[3]++;
  }
  long long m = *max_element(ans, ans + 4);
  cout << m << "\n";
  if (ans[0] == m)
    cout << x + 1 << " " << y;
  else if (ans[1] == m)
    cout << x << " " << y + 1;
  else if (ans[2] == m)
    cout << x - 1 << " " << y;
  else if (ans[3] == m)
    cout << x << " " << y - 1;
}
signed main() {
  OJ();
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
