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 cd, sx, sy, x, y;
map<int, int> add, add1;
map<int, pair<int, int> > sample;
int main() {
  cin >> cd >> sx >> sy;
  for (int i = 1; i <= cd; i++) {
    cin >> x >> y;
    if (x > sx) {
      add[1]++;
      sample[5] = pair<int, int>(x, y);
    }
    if (x < sx) {
      add[-1]++;
      sample[4] = pair<int, int>(x, y);
    }
    if (y > sy) {
      add1[1]++;
      sample[3] = pair<int, int>(x, y);
    }
    if (y < sy) {
      add1[-1]++;
      sample[1] = pair<int, int>(x, y);
    }
  }
  int a = 0, b = 0;
  int g = max(add[1], add[-1]);
  int h = max(add1[-1], add[1]);
  if (h > g) {
    cout << h << '\n';
    if (add1[-1] > add1[1]) {
      cout << sx << " " << sy - 1;
    } else {
      cout << sx << " " << sy + 1;
    }
  } else {
    cout << g << '\n';
    if (add[-1] > add[1]) {
      cout << sx - 1 << " " << sy;
    } else {
      cout << sx + 1 << " " << sy;
    }
  }
}
