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() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1, i, j, k;
  while (t--) {
    long long n, sx, x, y, sy, cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0;
    cin >> n >> sx >> sy;
    for (long long i = (long long)0; i < (long long)n; i++) {
      cin >> x >> y;
      if ((abs(sx - x) + abs(sy - y)) == (abs(sx - 1 - x) + abs(y - sy) + 1))
        cnt1++;
      if ((abs(sx - x) + abs(sy - y)) == (abs(sx + 1 - x) + abs(y - sy) + 1))
        cnt2++;
      if ((abs(sx - x) + abs(sy - y)) == (abs(sx - x) + abs(y - 1 - sy) + 1))
        cnt3++;
      if ((abs(sx - x) + abs(sy - y)) == (abs(sx - x) + abs(y + 1 - sy) + 1))
        cnt4++;
    }
    if ((cnt1 >= cnt2) && (cnt1 >= cnt3) && (cnt1 >= cnt4)) {
      cout << cnt1 << "\n";
      cout << sx - 1 << " " << sy << "\n";
    } else if ((cnt2 >= cnt1) && (cnt2 >= cnt3) && (cnt2 >= cnt4)) {
      cout << cnt2 << "\n";
      cout << sx + 1 << " " << sy << "\n";
    } else if ((cnt3 >= cnt1) && (cnt3 >= cnt2) && (cnt3 >= cnt4)) {
      cout << cnt3 << "\n";
      cout << sx << " " << sy - 1 << "\n";
    } else if ((cnt4 >= cnt1) && (cnt4 >= cnt2) && (cnt4 >= cnt3)) {
      cout << cnt4 << "\n";
      cout << sx << " " << sy + 1 << "\n";
    }
  }
  return 0;
}
