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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class compete608c {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		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[] res = new int[4];
		int[] zres = new int[4];
		for(int i = 0; i < n; i++) {
			st = new StringTokenizer(br.readLine());
			int x = Integer.parseInt(st.nextToken()) - sx;
			int y = Integer.parseInt(st.nextToken()) - sy;
			if(x > 0 && y > 0) {
				res[0]++;
			} else if(x > 0 && y < 0) {
				res[1]++;
			} else if (x < 0 && y < 0) {
				res[2]++;
			}else if(x < 0 && y > 0) {
				res[3]++;
			}
			
			if(x == 0) {
				if(y > 0) {
					zres[3]++;
				}else {
					zres[1]++;
				}
			}
			if(y == 0) {
				if(x > 0) {
					zres[0]++;
				}else {
					zres[2]++;
				}
			}
		}
		int max = 0;
		int maxi = 0;
		for(int i = 0; i < 4; i++) {
			int res1 = res[i] + zres[i] + res[(i + 1) % 4]; 
			int res2 = res[i] + zres[(i + 3) % 4] + res[(i + 3) % 4];
			if(res1 > max) {
				max = res1;
				maxi = i;
			}
			if(res2 > max) {
				max = res2;
				maxi = (i + 3) % 4;
			}
		}
		System.out.println(max);
		switch(maxi) {
			case 0: System.out.println(sx + 1 + " " + sy); break;
			case 1: System.out.println(sx + " " + Math.max(0, sy - 1)); break;
			case 2: System.out.println(Math.max(0, sx - 1) + " " + sy); break;
			case 3: System.out.println(sx + " " + (sy + 1)); break;
		}
	}

}
