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() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T, Sx, Sy;
  cin >> T >> Sx >> Sy;
  int n = 0, e = 0, s = 0, w = 0;
  for (int i = 0; i < T; i++) {
    int a, b;
    cin >> a >> b;
    if (a > Sx) e++;
    if (b > Sy) n++;
    if (a < Sx) w++;
    if (b < Sy) s++;
  }
  if (e == max(max(n, s), max(e, w))) {
    cout << e << "\n" << Sx + 1 << " " << Sy;
  } else if (n == max(max(n, s), max(e, w))) {
    cout << n << "\n" << Sx << " " << Sy + 1;
  } else if (w == max(max(n, s), max(e, w))) {
    cout << e << "\n" << Sx - 1 << " " << Sy;
  } else {
    cout << s << "\n" << Sx << " " << Sy - 1;
  }
  return 0;
}
