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;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, sx, sy;
  cin >> n >> sx >> sy;
  vector<pair<long long, long long>> p(n), c(n);
  for (long long i = 0; i < n; i++) {
    cin >> p[i].first;
    cin >> p[i].second;
  }
  long long q1 = 0, q2 = 0, q3 = 0, q4 = 0, l1 = 0, l2 = 0, l3 = 0, l4 = 0;
  for (long long i = 0; i < n; i++) {
    c[i].first = p[i].first - sx;
    c[i].second = p[i].second - sy;
    if (c[i].first > 0 && c[i].second > 0)
      q1++;
    else if (c[i].first < 0 && c[i].second > 0)
      q2++;
    else if (c[i].first < 0 && c[i].second < 0)
      q3++;
    else if (c[i].first > 0 && c[i].second < 0)
      q4++;
    if (c[i].second == 0 && c[i].first > 0)
      l1++;
    else if (c[i].first == 0 && c[i].second > 0)
      l2++;
    else if (c[i].first < 0 && c[i].second == 0)
      l3++;
    else if (c[i].first = 0 && c[i].second < 0)
      l4++;
  }
  long long max;
  if (q1 >= q2 && q1 >= q3 && q1 >= q4)
    max = q1;
  else if (q2 >= q1 && q2 >= q3 && q2 >= q4)
    max = q2;
  else if (q3 >= q2 && q3 >= q1 && q3 >= q4)
    max = q3;
  else if (q4 >= q2 && q4 >= q3 && q4 >= q1)
    max = q4;
  if (max == q1 && l1 >= l2) {
    cout << q1 + l1 + q4 << "\n";
    cout << sx + 1 << " " << sy;
    return 0;
  } else if (max == q1 && l1 <= l2) {
    cout << q1 + l2 + q2 << "\n";
    cout << sx << " " << sy + 1;
    return 0;
  }
  if (max == q2 && l2 >= l3) {
    cout << q2 + l2 + q1 << "\n";
    cout << sx << " " << sy + 1;
    return 0;
  } else if (max == q2 && l2 <= l3) {
    cout << q2 + l3 + q3 << "\n";
    cout << sx - 1 << " " << sy;
    return 0;
  }
  if (max == q3 && l3 >= l4) {
    cout << q3 + l3 + q2 << "\n";
    cout << sx - 1 << " " << sy;
    return 0;
  } else if (max == q3 && l3 <= l4) {
    cout << q3 + l4 + q4 << "\n";
    cout << sx << " " << sy - 1;
    return 0;
  }
  if (max == q4 && l4 >= l1) {
    cout << q4 + l4 + q3 << "\n";
    cout << sx << " " << sy - 1;
    return 0;
  } else if (max == q4 && l4 <= l1) {
    cout << q4 + l1 + q1 << "\n";
    cout << sx + 1 << " " << sy;
    return 0;
  }
  return 0;
}
