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 func(int a, int b, int c) { return abs(a - b) + abs(a - c) + abs(b - c); }
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, x, y, up = 0, down = 0, left = 0, right = 0;
  cin >> n >> x >> y;
  for (int i = 0; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    if (a < x) {
      ++left;
    }
    if (a > x) {
      ++right;
    }
    if (b > y) {
      ++up;
    }
    if (b < y) {
      ++down;
    }
  }
  if (up >= max(max(down, left), right)) {
    cout << up << '\n';
    cout << x << " " << y + 1;
    return 0;
  }
  if (down >= max(max(up, left), right)) {
    cout << down << '\n';
    cout << x << " " << y - 1;
    return 0;
  }
  if (left >= max(max(down, up), right)) {
    cout << left << '\n';
    cout << x - 1 << " " << y;
    return 0;
  }
  if (right >= max(max(down, up), left)) {
    cout << right << '\n';
    cout << x + 1 << " " << y;
    return 0;
  }
  return 0;
}
