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;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, sx, sy, i, x, y;
  vector<long long> v(4, 0);
  cin >> n >> sx >> sy;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    if (y < sy) v[0]++;
    if (x > sx) v[1]++;
    if (y > sy) v[2]++;
    if (x < sx) v[3]++;
  }
  long long maxin = 0;
  for (i = 0; i < 4; i++) {
    if (v[i] > v[maxin]) maxin = i;
  }
  cout << v[maxin] << '\n';
  if (maxin == 0)
    cout << sx << " " << sy - 1;
  else if (maxin == 1)
    cout << sx + 1 << " " << sy;
  else if (maxin == 2)
    cout << sx << " " << sy + 1;
  else if (maxin == 3)
    cout << sx - 1 << " " << sy;
  return 0;
}
