#include <bits/stdc++.h>
using namespace std;
int n, sx, sy, x[200010], y[200010];
int dx[] = {1, 1, 1, -1, -1, -1, 0, 0};
int dy[] = {1, 0, -1, 1, 0, -1, 1, -1};
int dis(int x, int y, int x2, int y2) { return abs(x2 - x) + abs(y2 - y); }
int main() {
  cin >> n >> sx >> sy;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
  }
  int ans = -1, num = -1;
  for (int i = 0; i < 8; i++) {
    int tx = sx + dx[i], ty = sy + dy[i];
    if (tx < 0 || tx > 1e9 || ty < 0 || ty > 1e9) continue;
    int dd = dis(tx, ty, sx, sy), cnt = 0;
    for (int j = 1; j <= n; j++) {
      if (dis(x[j], y[j], sx, sy) == dis(x[j], y[j], tx, ty) + dd) cnt++;
    }
    if (cnt > num) {
      ans = i;
      num = cnt;
    }
  }
  printf("%d\n%d %d\n", num, sx + dx[ans], sy + dy[ans]);
}
