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 n, sx, sy, i, x, y, j, k, xx, yy, maxim, solx, soly, cadran1, cadran2,
    cadran3, cadran4, a, b, c, d, e, f, g, h;
struct structura {
  int cadr;
  int f;
  int s;
};
structura v[10];
bool cmp(structura &a, structura &b) { return a.cadr > b.cadr; }
int main() {
  cin >> n >> sx >> sy;
  for (i = 1; i <= n; i++) {
    cin >> x >> y;
    x -= sx, y -= sy;
    if (x < 0) {
      a = x + sx, b = y + sy;
      cadran1++;
    }
    if (y < 0) {
      c = x + sx, d = y + sy;
      cadran2++;
    }
    if (x > 0) {
      e = x + sx, f = y + sy;
      cadran3++;
    }
    if (y > 0) {
      g = x + sx, h = y + sy;
      cadran4++;
    }
  }
  v[1].cadr = cadran1;
  v[1].f = a, v[1].s = b;
  v[2].cadr = cadran2;
  v[2].f = c, v[2].s = d;
  v[3].cadr = cadran3;
  v[3].f = e, v[3].s = f;
  v[4].cadr = cadran4;
  v[4].f = g, v[4].s = h;
  sort(v + 1, v + 4 + 1, cmp);
  i = 1;
  cout << v[i].cadr << "\n" << v[i].f << " " << v[i].s << "\n";
  return 0;
}
