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(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n, x, y;
  cin >> n >> x >> y;
  long long cntu = 0, cntd = 0, cntl = 0, cntr = 0;
  while (n--) {
    long long a, b;
    cin >> a >> b;
    if (a > x)
      cntr++;
    else if (a < x)
      cntl++;
    if (b > y)
      cntu++;
    else if (b < y)
      cntd++;
  }
  long long maxp = max({cntu, cntd, cntl, cntr});
  cout << maxp << endl;
  if (cntu == maxp) {
    cout << x << ' ' << y + 1;
  } else if (cntd == maxp) {
    cout << x << ' ' << y - 1;
  } else if (cntr == maxp) {
    cout << x + 1 << ' ' << y;
  } else if (cntl == maxp) {
    cout << x - 1 << ' ' << y;
  }
  return 0;
}
