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
import java.util.*;
import java.io.*;

public class c1271 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int sx = Integer.parseInt(st.nextToken());
		int sy = Integer.parseInt(st.nextToken());
		int[] xdir = {1,0,-1,0};
		int[] ydir = {0,-1,0,1};
		int[] x = new int[n];
		int[] y = new int[n];
		for (int i = 0; i<n; i++) {
			st = new StringTokenizer(br.readLine());
			x[i] = Integer.parseInt(st.nextToken());
			y[i] = Integer.parseInt(st.nextToken());
		}
		int INF = (int)1e9;
		int ans = 0;
		int px = -1, py = -1;
		for (int i = 0; i<4; i++) {
			int tx = sx+xdir[i];
			int ty = sy+ydir[i];
			if (!(tx >= 0 && tx <= INF && ty >= 0 && ty <= INF)) {
				continue;
			}
			int temp = 0;
			for (int j = 0; j<n; j++) {
				if (Math.min(x[j],sx) <= tx && tx <= Math.max(x[j],sx)) {
					if (Math.min(y[j],sy) <= ty && ty <= Math.max(y[j],sy)) {
						temp++;
					}
				}
			}
			if (temp > ans) {
				ans = temp;
				px = tx;
				py = ty;
			}
		}
		pw.println(ans);
		pw.println(px + " " + py);
		br.close();
		pw.close();
	}
}