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 n;
  cin >> n;
  long long x, y;
  cin >> x >> y;
  long long i0 = 0, i1 = 0, i2 = 0, j1 = 0, j2 = 0, j0 = 0;
  for (int i = 0; i < n; i++) {
    long long x1, y1;
    cin >> x1 >> y1;
    if (x1 >= x) i1++;
    if (x1 < x) i2++;
    if (y1 >= y) j1++;
    if (y1 < y) j2++;
  }
  long long ans = max(i1, i2);
  ans = max(ans, max(j2, j1));
  cout << ans << endl;
  if (ans == i1) {
    cout << x + 1 << " " << y;
    return 0;
  }
  if (ans == i2) {
    cout << x - 1 << " " << y;
    return 0;
  }
  if (ans == j1) {
    cout << x << " " << y + 1;
    return 0;
  }
  if (ans == j2) {
    cout << x << " " << y - 1;
    return 0;
  }
}
