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 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]);
}
