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;
long long int q1, q2, q3, q4, x_pl, x_mi, y_pl, y_mi;
int main() {
  long long int n, x0, y0, x1, y1;
  cin >> n >> x0 >> y0;
  for (long long int i = 0; i < n; i++) {
    cin >> x1 >> y1;
    if (x1 == x0) {
      if (y1 > y0)
        y_pl++;
      else
        y_mi++;
    } else if (y1 == y0) {
      if (x1 > x0)
        x_pl++;
      else
        x_mi++;
    } else {
      if (x1 > x0) {
        if (y1 > y0) {
          q1++;
        } else
          q2++;
      } else {
        if (y1 > y0) {
          q4++;
        } else
          q3++;
      }
    }
  }
  vector<pair<long long int, pair<long long int, long long int> > > p_ans;
  p_ans.push_back(make_pair(q1 + q4 + y_pl, make_pair(0, 1)));
  p_ans.push_back(make_pair(q1 + q2 + x_pl, make_pair(1, 0)));
  p_ans.push_back(make_pair(q2 + q3 + y_mi, make_pair(0, -1)));
  p_ans.push_back(make_pair(q3 + q4 + x_mi, make_pair(0, -1)));
  sort(p_ans.begin(), p_ans.end());
  cout << p_ans.back().first << endl;
  cout << x0 + p_ans.back().second.first << " "
       << y0 + p_ans.back().second.second;
}
