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;

public class Codeforces1271C_Real {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		String[] given1 = input.nextLine().split(" ");
		int students = Integer.parseInt(given1[0]);
		int schoolx = Integer.parseInt(given1[1]);
		int schooly = Integer.parseInt(given1[2]);
		int north = 0;
		int south = 0;
		int east = 0;
		int west = 0;
		int i;
		for (i = 0; i < students; i++) {
			String[] given2 = input.nextLine().split(" ");
			int studentx = Integer.parseInt(given2[0]);
			int studenty = Integer.parseInt(given2[1]);
			if (studentx > schoolx) {
				east += 1;
			}
			else if (studentx < schoolx) {
				west += 1;
			}
			if (studenty > schooly) {
				north += 1;
			}
			else if (studenty < schooly) {
				south += 1;
			}
		}
		int best = Math.max(Math.max(north, south), Math.max(east, west));
		System.out.println(best);
		if (north == best)
			System.out.println((schoolx) + " " + (schooly + 1));
		else if (south == best)
			System.out.println((schoolx) + " " + (schooly - 1));
		else if (east == best)
			System.out.println((schoolx + 1) + " " + (schooly));
		else if (west == best)
			System.out.println((schoolx - 1) + " " + (schooly));	
	}
}