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 d[4];
int main() {
  int x, y, n, sx, sy, d1, d2;
  cin >> n >> sx >> sy;
  while (n--) {
    cin >> x >> y;
    d1 = x - sx;
    d2 = y - sy;
    if (d1 > 0)
      d[0]++;
    else if (d1 < 0)
      d[2]++;
    if (d2 > 0)
      d[3]++;
    else if (d2 < 0)
      d[1]++;
  }
  if (d[0] > d[1] && d[0] > d[2] && d[0] > d[3]) {
    cout << d[0] << endl;
    cout << (sx + 1) << ' ' << sy << endl;
  } else if (d[1] > d[2] && d[1] > d[3]) {
    cout << d[1] << endl;
    cout << sx << ' ' << (sy - 1) << endl;
  } else if (d[2] > d[3]) {
    cout << d[2] << endl;
    cout << (sx - 1) << ' ' << sy << endl;
  } else {
    cout << d[3] << endl;
    cout << sx << ' ' << (sy + 1) << endl;
  }
  return 0;
}
