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.*;

public class C {
	static Scanner sc = new Scanner(System.in);

	static void test() {
		int n = sc.nextInt();
		int sx = sc.nextInt();
		int sy = sc.nextInt();

		int res1 = 0;
		int res2 = 0;
		int res3 = 0;
		int res4 = 0;

		for (int i = 0; i < n; i++) {
			int x = sc.nextInt();
			int y = sc.nextInt();
			
			if (Math.abs(x - (sx + 1)) + Math.abs(y - sy) >
				Math.abs(x - sx) + Math.abs(y - sy))
				res1++;
			if (Math.abs(x - (sx - 1)) + Math.abs(y - sy) >
				Math.abs(x - sx) + Math.abs(y - sy))
				res3++;
			if (Math.abs(x - sx) + Math.abs(y - sy - 1) >
				Math.abs(x - sx) + Math.abs(y - sy))
				res2++;
			if (Math.abs(x - sx) + Math.abs(y - sy + 1) >
				Math.abs(x - sx) + Math.abs(y - sy))
				res4++;
		}
		int min = Math.min(Math.min(res1, res2), Math.min(res3, res4));
		if (res1 == min) System.out.println(n - res1 + "\n" + (sx + 1 + " " + sy));
		else if (res2 == min) System.out.println(n - res2 + "\n" + (sx + " " + (sy + 1)));
		else if (res3 == min) System.out.println(n - res3 + "\n" + (sx - 1 + " "  + sy));
		else System.out.println(n - res4 + "\n" + (sx + " " + (sy - 1)));
	}
	
	public static void main(String[] args) {
		test();
	}
}
