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 main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  int l = 0, r = 0, u = 0, d = 0;
  while (n--) {
    int x, y;
    cin >> x >> y;
    if (sx - 1 >= x)
      l++;
    else if (sx + 1 <= x)
      r++;
    if (sy - 1 >= y)
      d++;
    else if (sy + 1 <= y)
      u++;
  }
  vector<int> dir = {l, r, u, d};
  int mx = max(l, max(r, max(u, d)));
  cout << mx << '\n';
  if (mx == l)
    cout << sx - 1 << " " << sy << '\n';
  else if (mx == r)
    cout << sx + 1 << " " << sy << '\n';
  else if (mx == d)
    cout << sx << " " << sy - 1 << '\n';
  else
    cout << sx << " " << sy + 1 << '\n';
  return 0;
}
