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 int n;
  cin >> n;
  long long int x[n], y[n];
  long long int sx, sy;
  cin >> sx >> sy;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  long long int count[4];
  for (int i = 0; i < n; i++) {
    count[i] = 0;
  }
  long long int d[4] = {0};
  for (int i = 0; i < n; i++) {
    long long int dis = abs(sx - x[i]) + abs(sy - y[i]);
    d[0] = abs(sx + 1 - x[i]) + abs(sy - y[i]);
    d[1] = abs(sx - 1 - x[i]) + abs(sy - y[i]);
    d[2] = abs(sx - x[i]) + abs(sy + 1 - y[i]);
    d[3] = abs(sx - x[i]) + abs(sy - 1 - y[i]);
    for (int i = 0; i < 4; i++) {
      if (d[i] + 1 == dis) {
        count[i]++;
      }
    }
  }
  long long int max = 0;
  long long int ans = 0;
  for (int i = 0; i < 4; i++) {
    if (count[i] > max) {
      max = count[i];
      ans = i + 1;
    }
  }
  cout << max << endl;
  if (ans == 1) {
    cout << sx + 1 << " " << sy << endl;
  } else if (ans == 2) {
    cout << sx - 1 << " " << sy << endl;
  } else if (ans == 3) {
    cout << sx << " " << sy + 1 << endl;
  } else if (ans == 4) {
    cout << sx << " " << sy - 1 << endl;
  }
  return 0;
}
