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() {
  long long int n, sx, sy, c, b;
  cin >> n >> sx >> sy;
  long long int x[4] = {0, 0, 1, -1}, y[4] = {1, -1, 0, 0};
  vector<long long int> z(4, 0);
  for (int i = 0; i < n; i++) {
    cin >> c >> b;
    c -= sx;
    b -= sy;
    if (c > 0 && b > 0) {
      z[0]++;
      z[2]++;
    }
    if (c > 0 && b < 0) {
      z[2]++;
      z[1]++;
    }
    if (c < 0 && b > 0) {
      z[0]++;
      z[3]++;
    }
    if (c < 0 && b < 0) {
      z[1]++;
      z[3]++;
    }
  }
  cout << *max_element(z.begin(), z.end()) << endl;
  for (int i = 0; i < 4; i++) {
    if (z[i] == *max_element(z.begin(), z.end())) {
      cout << sx + x[i] << ' ' << sy + y[i];
      return 0;
    }
  }
  return 0;
}
