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() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, sx, sy, i;
  cin >> n >> sx >> sy;
  long long int sx1[n], sy1[n];
  for (i = 0; i < n; i++) cin >> sx1[i] >> sy1[i];
  long long int top = 0, bottom = 0, left = 0, right = 0;
  for (i = 0; i < n; i++) {
    if (sx1[i] - sx > 0) right++;
    if (sy1[i] - sy < 0) bottom++;
    if (sy1[i] - sy > 0) top++;
    if (sx1[i] - sx < 0) left++;
  }
  long long int max = top, swx = sx, swy = sy + 1;
  if (bottom > max) {
    max = bottom;
    swx = sx;
    swy = sy - 1;
  }
  if (left > max) {
    max = left;
    swx = sx - 1;
    swy = sy;
  }
  if (right > max) {
    max = right;
    swx = sx + 1;
    swy = sy;
  }
  cout << max << endl << swx << " " << swy;
  return 0;
}
