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 n, sx, sy, x, y, countsx_ = 0, countsy_ = 0, countsx = 0,
                             countsy = 0;
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if ((min(x, sx) <= sx - 1 && sx - 1 <= max(x, sx)) &&
        (min(y, sy) <= sy && sy <= max(y, sy)))
      countsx_++;
    if ((min(x, sx) <= sx && sx <= max(x, sx)) &&
        (min(y, sy) <= sy - 1 && sy - 1 <= max(y, sy)))
      countsy_++;
    if ((min(x, sx) <= sx + 1 && sx + 1 <= max(x, sx)) &&
        (min(y, sy) <= sy && sy <= max(y, sy)))
      countsx++;
    if ((min(x, sx) <= sx && sx <= max(x, sx)) &&
        (min(y, sy) <= sy + 1 && sy + 1 <= max(y, sy)))
      countsy++;
  }
  long long m = max(countsx, max(countsx_, max(countsy, countsy_)));
  if (countsx == m)
    cout << countsx << '\n' << sx + 1 << ' ' << sy;
  else if (countsx_ == m)
    cout << countsx_ << '\n' << sx - 1 << ' ' << sy;
  else if (countsy == m)
    cout << countsy << '\n' << sx << ' ' << sy + 1;
  else if (countsy_ == m)
    cout << countsy_ << '\n' << sx << ' ' << sy - 1;
  return 0;
}
