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 dist(long long x1, long long y1, long long x2, long long y2) {
  return abs(x1 - x2) + abs(y1 - y2);
}
bool isvalid(long long x, long long y) {
  return (x >= 0 && y >= 0 && x <= 1e9 && y <= 1e9);
}
int main() {
  long long n, sx, sy, i, x, y, j;
  cin >> n >> sx >> sy;
  vector<pair<long long, long long> > v;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    v.push_back({x, y});
  }
  long long xi[] = {-1, -1, -1, 0, 1, 1, 1, 0};
  long long yi[] = {-1, 0, 1, 1, 1, 0, -1, -1};
  int maxi = 0, indi, indj;
  for (i = 0; i < 8; i++) {
    int curx = sx + xi[i];
    int cury = sy + yi[i];
    if (isvalid(curx, cury)) {
      int count = 0;
      for (j = 0; j < n; j++) {
        if (dist(v[j].first, v[j].second, curx, cury) + abs(xi[i]) +
                abs(yi[i]) ==
            dist(v[j].first, v[j].second, sx, sy)) {
          count++;
        }
      }
      if (maxi < count) {
        indi = curx;
        indj = cury;
        maxi = count;
      }
    }
  }
  cout << maxi << endl;
  cout << indi << " " << indj << endl;
}
