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, sx, sy;
  long long a = 0, b = 0, c = 0, d = 0;
  cin >> n >> sx >> sy;
  pair<long long, long long> pos[n];
  for (int i = 0; i < n; i++) {
    cin >> pos[i].first >> pos[i].second;
    if (pos[i].first >= 0 && pos[i].second > sy) a += a;
    if (pos[i].first > sx && pos[i].second >= 0) b += b;
    if (pos[i].first >= 0 && pos[i].second < sy) c += c;
    if (pos[i].first < sx && pos[i].second >= 0) d += d;
  }
  if (a >= b && a >= c && a >= d) {
    cout << a << "\n";
    cout << sx << " " << sy + 1 << "\n";
  } else if (b >= a && b >= c && b >= d) {
    cout << b << "\n";
    cout << sx + 1 << " " << sy << "\n";
  } else if (c >= a && c >= b && c >= d) {
    cout << c << "\n";
    cout << sx << " " << sy - 1 << "\n";
  } else {
    cout << d << "\n";
    cout << sx - 1 << " " << sy << "\n";
  }
}
