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>
const double eps = 1e-6;
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 5;
using namespace std;
int x, y;
int t, n, m, s = 0;
int a = 0, b = 0, c = 0, d = 0;
int main() {
  cin >> n >> x >> y;
  while (n--) {
    cin >> t >> m;
    if (t < x)
      a++;
    else if (t > x)
      c++;
    if (m < y)
      d++;
    else if (m > y)
      b++;
  }
  s = max(max(a, b), max(c, d));
  cout << s << endl;
  if (s == a) {
    cout << x - 1 << " " << y << endl;
  } else if (s == b) {
    cout << x << " " << y + 1 << endl;
  } else if (s == c) {
    cout << x + 1 << " " << y << endl;
  } else {
    cout << x << " " << y - 1 << endl;
  }
  return 0;
}
