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 x[200005];
int y[200005];
int main() {
  int n;
  int sx, sy;
  cin >> n >> sx >> sy;
  int u = 0;
  int d = 0;
  int l = 0;
  int r = 0;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
    cin >> y[i];
    if (x[i] > sx) r++;
    if (x[i] < sx) l++;
    if (y[i] > sy) u++;
    if (y[i] < sy) d++;
  }
  int ans = max(max(max(r, l), u), d);
  cout << ans << endl;
  if (u == ans) {
    printf("%d %d", sx, sy + 1);
  } else if (d == ans) {
    printf("%d %d", sx, sy - 1);
  } else if (l == ans) {
    printf("%d %d", sx - 1, sy);
  } else if (r == ans) {
    printf("%d %d", sx + 1, sy);
  }
  return 0;
}
