#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sx, sy;
  int d[8] = {-1, 0, 1, 0, 0, -1, 0, 1};
  int *x, *y;
  int i, j;
  int rst = 0, sub_rst, rst_x, rst_y;
  cin >> n >> sx >> sy;
  x = new int[n];
  y = new int[n];
  for (i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  for (i = 0; i < 8; i += 2) {
    int dx = sx + d[i];
    int dy = sy + d[i + 1];
    sub_rst = 0;
    for (j = 0; j < n; j++) {
      if (min(sx, x[j]) <= dx && max(sx, x[j]) >= dx && min(sy, y[j]) <= dy &&
          max(sy, y[j]) >= dy) {
        sub_rst++;
      }
    }
    if (rst < sub_rst) {
      rst = sub_rst;
      rst_x = dx;
      rst_y = dy;
    }
  }
  cout << rst << '\n';
  cout << rst_x << ' ' << rst_y << '\n';
  return 0;
}
