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 n;
int sx, sy;
int ans[4];
int d[][2] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};
int main() {
  cin >> n >> sx >> sy;
  int x, y;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x, &y);
    if (sx == x) {
      if (sy < y)
        ans[0]++;
      else
        ans[2]++;
    } else if (sy == y) {
      if (sx < x)
        ans[1]++;
      else
        ans[3]++;
    } else {
      if (sx < x) {
        if (sy < y)
          ans[0]++, ans[1]++;
        else
          ans[2]++, ans[1]++;
      } else {
        if (sy < y)
          ans[0]++, ans[3]++;
        else
          ans[2]++, ans[3]++;
      }
    }
  }
  int id = 4;
  for (int i = 0; i < 4; i++)
    if (ans[id] < ans[i]) id = i;
  cout << ans[id] << endl;
  cout << sx + d[id][0] << " " << sy + d[id][1] << endl;
  return 0;
}
