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;
  cin >> n >> sx >> sy;
  int a1 = 0, a2 = 0, a3 = 0, a4 = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x >= sx && y >= sy)
      a1++;
    else if (x <= sx && y >= sy)
      a2++;
    else if (x <= sx && y <= sy)
      a3++;
    else if (x >= sx && y <= sy)
      a4++;
  }
  int sum12 = a1 + a2, sum23 = a2 + a3, sum34 = a3 + a4, sum14 = a1 + a4;
  int mx = max(sum12, max(sum23, max(sum34, sum14)));
  cout << mx << endl;
  if (mx == sum12)
    cout << sx << ' ' << sy + 1;
  else if (mx == sum23)
    cout << sx - 1 << ' ' << sy;
  else if (mx == sum34)
    cout << sx << ' ' << sy - 1;
  else if (mx == sum14)
    cout << sx + 1 << ' ' << sy;
}
