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 n, sx, sy;
  cin >> n >> sx >> sy;
  vector<long long> v(4, 0);
  long long x, y;
  for (long long i = 0; i < n; i++) {
    cin >> x >> y;
    if (abs((sx + 1) - x) + abs(sy - y) == abs(sx - x) + abs(sy - y) - 1)
      ++v[0];
    if (abs(sx - x) + abs((sy - 1) - y) == abs(sx - x) + abs(sy - y) - 1)
      ++v[1];
    if (abs((sx - 1) - x) + abs(sy - y) == abs(sx - x) + abs(sy - y) - 1)
      ++v[2];
    if (abs(sx - x) + abs((sy + 1) - y) == abs(sx - x) + abs(sy - y) - 1)
      ++v[3];
  }
  long long res = 0;
  for (long long i = 1; i < n; i++) {
    if (v[i] > v[i - 1]) {
      res = i;
    }
  }
  cout << v[res] << endl;
  if (res == 0) cout << sx + 1 << " " << sy << endl;
  if (res == 1) cout << sx << " " << sy - 1 << endl;
  if (res == 2) cout << sx - 1 << " " << sy << endl;
  if (res == 3) cout << sx << " " << sy + 1 << endl;
}
