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;
using ii = int64_t;
int main() {
  ii n;
  cin >> n;
  ii sx;
  cin >> sx;
  ii sy;
  cin >> sy;
  ii access[4] = {0};
  for (ii i = 0; i < n; i++) {
    ii x;
    cin >> x;
    ii y;
    cin >> y;
    x -= sx;
    y -= sy;
    if (x > 0) {
      access[1]++;
    }
    if (x < 0) {
      access[3]++;
    }
    if (y > 0) {
      access[0]++;
    }
    if (y < 0) {
      access[2]++;
    }
  }
  ii direction = -1;
  ii _max = INT64_MIN;
  for (ii i = 0; i < 4; i++) {
    if (access[i] > _max) {
      _max = access[i];
      direction = i;
    }
  }
  ii ax = 0;
  ii ay = 0;
  switch (direction) {
    case 0:
      ay = 1;
      break;
    case 2:
      ay = -1;
      break;
    case 1:
      ax = 1;
      break;
    case 3:
      ax = -1;
      break;
  }
  ax += sx;
  ay += sy;
  cout << _max << "\n";
  cout << ax << " " << ay << "\n";
  return 0;
}
