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() {
  int t;
  t = 1;
  while (t--) {
    long long n, i, j, w, h, count = 0, sum = 0, total, k, T, breaks = 0, sx,
                             sy, x, y;
    string s;
    cin >> n >> sx >> sy;
    long long a[n];
    long long up = 0, down = 0, right = 0, left = 0;
    for (i = 1; i <= n; i++) {
      cin >> x >> y;
      if (x > sx) {
        right++;
      } else if (x < sx) {
        left++;
      }
      if (y > sy) {
        up++;
      } else if (sy > y) {
        down++;
      }
    }
    long long maxi = max(up, down);
    maxi = max(maxi, left);
    maxi = max(maxi, right);
    cout << maxi << endl;
    if (max(left, right) >= max(up, down)) {
      if (right > left) {
        cout << sx + 1 << " ";
      } else {
        cout << sx - 1 << " ";
      }
      cout << sy;
    } else {
      cout << sx << " ";
      if (up > down) {
        cout << sy + 1;
      } else {
        cout << sy - 1 << endl;
      }
    }
  }
}
