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;
void init_code() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  init_code();
  long long int n, x, y;
  cin >> n >> x >> y;
  long long int q1 = 0, q2 = 0, q3 = 0, q4 = 0;
  long long int arr[n][2];
  for (int i = 0; i < n; ++i) {
    long long int x1, y1;
    cin >> x1 >> y1;
    arr[i][0] = x1 - x;
    arr[i][1] = y1 - y;
    if (arr[i][0] >= 0 && arr[i][1] >= 0) {
      q1++;
    } else if (arr[i][0] <= 0 && arr[i][1] >= 0) {
      q2++;
    } else if (arr[i][0] <= 0 && arr[i][1] <= 0) {
      q3++;
    } else
      q4++;
  }
  long long int sum[4] = {q1 + q2, q2 + q3, q3 + q4, q4 + q1};
  long long int k = 0, add = sum[0];
  for (int i = 0; i < 4; ++i) {
    if (sum[i] > add) {
      add = sum[i];
      k = i;
    }
  }
  cout << add << endl;
  if (k == 0) {
    cout << x << " " << y + 1 << endl;
  } else if (k == 1) {
    cout << x - 1 << " " << y << endl;
  } else if (k == 2) {
    cout << x << " " << y - 1 << endl;
  } else
    cout << x + 1 << " " << y << endl;
  return 0;
}
