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 inf = 0x3f3f3f3f;
long long infl = 0x3f3f3f3f3f3f3f3fLL;
long double infd = 1.0 / 0.0;
const double pi = 2 * acos(0.0);
const int MOD = 1e9 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int tt = 1;
  while (tt--) {
    long long n, sx, sy;
    cin >> n >> sx >> sy;
    vector<pair<pair<int, int>, int>> lc;
    for (int i = 0; i < n; i++) {
      int x, y;
      cin >> x >> y;
      lc.push_back({{x, y}, abs(sx - x) + abs(sy - y)});
    }
    int k = 0;
    vector<pair<int, int>> ps;
    ps.push_back({sx, sy + 1});
    ps.push_back({sx, sy - 1});
    ps.push_back({sx + 1, sy});
    ps.push_back({sx - 1, sy});
    vector<int> as{-1, 0, 0};
    for (int i = 0; i < 4; i++) {
      int x1 = ps[i].first;
      int y1 = ps[i].second;
      if (x1 < 0 || y1 < 0) continue;
      for (int j = 0; j < n; j++) {
        if (i == 0) {
          if (lc[j].first.second >= y1) {
            k++;
          }
        }
        if (i == 1) {
          if (lc[j].first.second <= y1) {
            k++;
          }
        }
        if (i == 2) {
          if (lc[j].first.first >= x1) {
            k++;
          }
        }
        if (i == 3) {
          if (lc[j].first.first <= x1) {
            k++;
          }
        }
      }
      if (k > as[0]) {
        as[0] = k;
        k = 0;
        as[1] = x1;
        as[2] = y1;
      }
      k = 0;
    }
    cout << as[0] << '\n';
    cout << as[1] << " " << as[2];
  }
  return 0;
}
