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;
struct cart {
  long long int x, y;
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, sx, sy, j, q1 = 0, q2 = 0, q3 = 0, q4 = 0, lx1 = 0, lx2 = 0,
                              ly1 = 0, ly2 = 0, maxq, maxl;
  cin >> n >> sx >> sy;
  cart a[n], b[n];
  for (j = 0; j < n; j++) {
    cin >> a[j].x >> a[j].y;
    a[j].x = a[j].x - sx;
    a[j].y = a[j].y - sy;
    if (a[j].x > 0 && a[j].y > 0) q1++;
    if (a[j].x < 0 && a[j].y > 0) q2++;
    if (a[j].x < 0 && a[j].y < 0) q3++;
    if (a[j].x > 0 && a[j].y < 0) q4++;
    if (a[j].x == 0 && a[j].y > 0) ly1++;
    if (a[j].x == 0 && a[j].y < 0) ly2++;
    if (a[j].x > 0 && a[j].y == 0) lx1++;
    if (a[j].x < 0 && a[j].y == 0) lx2++;
  }
  maxq = max(q1, q2);
  maxq = max(maxq, q3);
  maxq = max(maxq, q4);
  if (maxq == q2) {
    if (lx2 > ly1) {
      cout << q2 + lx1 << endl;
      cout << sx - 1 << " " << sy << endl;
    } else {
      cout << q2 + ly1 << endl;
      cout << sx << " " << sy + 1 << endl;
    }
  } else if (maxq == q1) {
    if (lx1 > ly1) {
      cout << q1 + lx1 << endl;
      cout << sx + 1 << " " << sy << endl;
    } else {
      cout << q2 + ly1 << endl;
      cout << sx << " " << sy + 1 << endl;
    }
  } else if (maxq == q3) {
    if (lx2 > ly2) {
      cout << q3 + lx2 << endl;
      cout << sx - 1 << " " << sy << endl;
    } else {
      cout << q3 + ly2 << endl;
      cout << sx << " " << sy - 1 << endl;
    }
  } else if (maxq == q4) {
    if (lx1 > ly2) {
      cout << q4 + lx1 << endl;
      cout << sx + 1 << " " << sy << endl;
    } else {
      cout << q4 + ly2 << endl;
      cout << sx << " " << sy - 1 << endl;
    }
  }
  return 0;
}
