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;
  int sx, sy;
  int hi_m = 0, hj_m = 0, a, b;
  cin >> n;
  cin >> sx >> sy;
  int t1, t2, t3, t4, t5, t6, t7, t8;
  t1 = sx;
  t2 = sy + 1;
  t3 = sx;
  t4 = sy - 1;
  t5 = sx - 1;
  t6 = sy;
  t7 = sx + 1;
  t8 = sy;
  int up = 0, down = 0, left = 0, right = 0;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    if (b >= t2) {
      up++;
    }
    if (b <= t4) {
      down++;
    }
    if (a <= t5) {
      left++;
    }
    if (a >= t7) {
      right++;
    }
  }
  vector<int> v;
  v.push_back(up);
  v.push_back(down);
  v.push_back(left);
  v.push_back(right);
  sort(v.begin(), v.end(), greater<int>());
  if (v[0] == up) {
    cout << up << endl;
    cout << t1 << " " << t2 << endl;
  } else if (v[0] == down) {
    cout << down << endl;
    cout << t3 << " " << t4 << endl;
  } else if (v[0] == left) {
    cout << left << endl;
    cout << t5 << " " << t6 << endl;
  } else if (v[0] == right) {
    cout << right << endl;
    cout << t7 << " " << t8 << endl;
  }
}
