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() {
  long long a, b, c, d, e, f[99] = {0}, g, h, j, i, k = 0, o, l, p;
  cin >> a >> b >> c;
  long long x[a], y[a];
  g = 0;
  h = 0;
  l = 0;
  o = 0;
  for (i = 0; i < a; i++) {
    cin >> x[i] >> y[i];
    if (x[i] < b)
      f[0]++;
    else if (x[i] > b)
      f[1]++;
    if (y[i] < c)
      f[2]++;
    else if (x[i] > c)
      f[3]++;
  }
  for (i = 0; i < 4; i++) {
    o = max(o, f[i]);
  }
  if (o == f[0])
    b--;
  else if (o == f[1])
    b++;
  else if (o == f[2])
    c--;
  else
    c++;
  cout << o << endl << b << " " << c << endl;
  return 0;
}
