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() {
  int num, x, y, ws = 0, es = 0, en = 0, wn = 0;
  cin >> num >> x >> y;
  int x1, y1;
  for (int i = 0; i < num; i++) {
    cin >> x1 >> y1;
    if (x1 < x)
      ws++;
    else if (x1 > x)
      es++;
    else if (y1 > y)
      en++;
    else if (y1 < y)
      wn++;
  }
  int ax, ay, ans = 0;
  if (ws >= es && ws >= en && ws >= wn) {
    ax = x - 1;
    ay = y;
    ans = ws;
  } else if (es >= ws && es >= en && es >= wn) {
    ax = x + 1;
    ay = y;
    ans = es;
  } else if (en >= wn && en >= ws && en >= es) {
    ax = x;
    ay = y + 1;
    ans = en;
  } else if (wn >= en && wn >= es && wn >= ws) {
    ax = x;
    ay = y - 1;
    ans = wn;
  }
  cout << ans << endl;
  cout << ax << ' ' << ay << endl;
}
