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() {
  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;
}
