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() {
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  long long x[200000], y[200000];
  long long left = 0, right = 0, down = 0, up = 0;
  for (long long i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    if (x[i] < sx)
      left++;
    else if (x[i] > sx)
      right++;
    else if (y[i] < sy)
      down++;
    else if (y[i] > sy)
      up++;
  }
  long long s = max({left, right, down, up});
  cout << s << endl;
  if (s == left) cout << sx - 1 << " " << sy << endl;
  if (s == right) cout << sx + 1 << " " << sy << endl;
  if (s == up) cout << sx << " " << sy + 1 << endl;
  if (s == down) cout << sx << " " << sy - 1 << endl;
  return 0;
}
