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 t, n, j, ans, c, y, x, b, i, a, f;
  int e = 0, w = 0, no = 0, s = 0;
  char g;
  cin >> n >> a >> b;
  while (n--) {
    cin >> x >> y;
    if (x < a) w++;
    if (x > a) e++;
    if (y < b) s++;
    if (y > b) no++;
  }
  ans = max(max(e, w), max(no, s));
  if (ans == e) {
    a += 1;
  } else if (ans == w)
    a -= 1;
  else if (ans == s)
    b -= 1;
  else
    b += 1;
  cout << ans << endl;
  cout << a << " " << b << endl;
  return 0;
}
