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 int n, sx, sy, quad1 = 0, quad2 = 0, quad3 = 0, quad4 = 0, posx = 0,
                      posy = 0, negx = 0, negy = 0;
  cin >> n;
  vector<pair<long int, long int>> pos(n);
  cin >> sx >> sy;
  for (int i = 0; i < n; i++) {
    long int x, y;
    cin >> x >> y;
    pos[i].first = x - sx;
    pos[i].second = y - sy;
  }
  for (int i = 0; i < n; i++) {
    if (pos[i].first > 0 && pos[i].second > 0)
      quad1++;
    else if (pos[i].first > 0 && pos[i].second < 0)
      quad4++;
    else if (pos[i].first < 0 && pos[i].second > 0)
      quad2++;
    else if (pos[i].first < 0 && pos[i].second < 0)
      quad3++;
  }
  for (int i = 0; i < n; i++) {
    if (pos[i].first == 0 && pos[i].second > 0)
      posy++;
    else if (pos[i].first == 0 && pos[i].second < 0)
      negy++;
    else if (pos[i].first < 0 && pos[i].second == 0)
      negx++;
    else if (pos[i].first > 0 && pos[i].second == 0)
      posx++;
  }
  long int ans[5];
  ans[0] = 0;
  ans[1] = posx + quad1 + quad4;
  ans[2] = posy + quad1 + quad2;
  ans[3] = negx + quad2 + quad3;
  ans[4] = negy + quad3 + quad4;
  for (int i = 1; i < 5; i++) ans[0] = max(ans[0], ans[i]);
  if (ans[1] == ans[0]) {
    cout << ans[0] << "\n";
    cout << 1 + sx << " " << sy << "\n";
  } else if (ans[2] == ans[0]) {
    cout << ans[0] << "\n";
    cout << sx << " " << 1 + sy << "\n";
  } else if (ans[3] == ans[0]) {
    cout << ans[0] << "\n";
    cout << sx - 1 << " " << sy << "\n";
  } else {
    cout << ans[0] << "\n";
    cout << sx - 1 << " " << sy - 1 << "\n";
  }
}
