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.Scanner;
import java.util.*;
public class C {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int sX = sc.nextInt();
		int sY = sc.nextInt();
		int[] X = new int[n];
		int[] Y = new int[n];
		for(int i = 0; i < n; i++) {
			X[i] = sc.nextInt();
			Y[i] = sc.nextInt();
		}
			
		int[] dY = {1,1,0,-1,-1,-1,0,1};
		int[] dX = {0,1,1,1,0,-1,-1,-1};
		int result = 0;
		int resX = 0,resY = 0;
		for(int d = 0; d < 8; d++) {
			int newY = sY + dY[d];
			int newX = sX + dX[d];
			int res = 0;
			if(0 <= newX && newX <= 10e9 && 0 <= newY && newY <= 10e9) {
				for(int i = 0; i < n; i++) {
					int minY = Math.min(sY, Y[i]);
					int minX = Math.min(sX, X[i]);
					int maxY = Math.max(sY, Y[i]);
					int maxX = Math.max(sX, X[i]);
					if(minY <= newY && newY <= maxY)
						if(minX <= newX && newX <= maxX)
							res++;
				}
			}
			if(res > result) {
				result = res;
				resY = newY;
				resX = newX;
			}
		}
		System.out.println(result);
		System.out.println(resX + " " + resY);
	}
}
