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;
int debug = 0;
int main() {
  int n, x, y;
  cin >> n >> x >> y;
  vector<pair<int, int>> v(n);
  int u = 0, d = 0, r = 0, l = 0;
  for (int i = 0; i < n; ++i) {
    cin >> v[i].first >> v[i].second;
    if (v[i].first > x)
      ++r;
    else if (v[i].first < x)
      ++l;
    if (v[i].second > y)
      ++u;
    else if (v[i].second < y)
      ++d;
  }
  int ans = max(max(u, d), max(l, r));
  if (ans == r)
    cout << r << '\n' << x + 1 << " " << y;
  else if (ans == l)
    cout << l << '\n' << x - 1 << " " << y;
  else if (ans == u)
    cout << u << '\n' << x << " " << y + 1;
  else
    cout << d << '\n' << x << " " << y - 1;
  return 0;
}
