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 gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  int a[4] = {0};
  int c1 = 0, c2 = 0, c3 = 0, c4 = 0;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    if (sx > x) {
      a[0]++;
      c1++;
    }
    if (sx < x) {
      a[1]++;
      c2++;
    }
    if (sy > y) {
      c3++;
      a[2]++;
    }
    if (sy < y) {
      c4++;
      a[3]++;
    }
  }
  int mx = 0, ind = -1;
  for (int i = 0; i < 4; i++) {
    if (mx < a[i]) {
      mx = a[i];
      ind = i;
    }
  }
  if (ind == 0) {
    cout << c1 << "\n" << sx - 1 << " " << sy;
  }
  if (ind == 1) {
    cout << c2 << "\n" << sx + 1 << " " << sy;
  }
  if (ind == 2) {
    cout << c3 << "\n" << sx << " " << sy - 1;
  }
  if (ind == 3) {
    cout << c4 << "\n" << sx << " " << sy + 1;
  }
  return 0;
}
