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() {
  long long int n, s1, s2;
  cin >> n >> s1 >> s2;
  vector<pair<long long int, long long int> > v;
  for (long long int(i) = (0); (i) < (n); (i)++) {
    long long int x, y;
    cin >> x >> y;
    v.push_back({x, y});
  }
  long long int ans = 0;
  long long int ar[4] = {0, 0, 0, 0};
  for (long long int(i) = (0); (i) < (n); (i)++) {
    long long int sho = abs(s1 - v[i].first) + abs(s2 - v[i].second);
    long long int p1 = abs(v[i].first - (s1 + 1)) + abs(s2 - v[i].second);
    long long int p2 = abs((s1 + 1) - s1) + abs(s2 - s2);
    long long int p3 = abs(v[i].first - (s1)) + abs(s2 + 1 - v[i].second);
    long long int p4 = abs((s1)-s1) + abs(s2 - (s2 + 1));
    long long int p5 = abs(v[i].first - (s1 - 1)) + abs(s2 - v[i].second);
    long long int p6 = abs((s1 - 1) - s1) + abs(s2 - s2);
    long long int p7 = abs(v[i].first - (s1)) + abs((s2 - 1) - v[i].second);
    long long int p8 = abs((s1)-s1) + abs(s2 - (s2 - 1));
    if (sho == p1 + p2) {
      ar[0] = ar[0] + 1;
    }
    if (sho == p3 + p4) {
      ar[1] = ar[1] + 1;
    }
    if (sho == p5 + p6) {
      ar[2] = ar[2] + 1;
    }
    if (sho == p7 + p8) {
      ar[3] = ar[3] + 1;
    }
  }
  long long int ma = ar[0];
  for (long long int(i) = (0); (i) < (4); (i)++) {
    ma = max(ma, ar[i]);
  }
  for (long long int(i) = (0); (i) < (4); (i)++) {
    if (ma == ar[i]) {
      cout << ma << endl;
      if (i == 0) {
        cout << s1 + 1 << " " << s2 << endl;
      } else if (i == 1) {
        cout << s1 + 1 << " " << s2 + 1 << endl;
      } else if (i == 2) {
        cout << s1 - 1 << " " << s2 << endl;
      } else {
        cout << s1 << " " << s2 - 1 << endl;
      }
      break;
    }
  }
}
