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 Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int n = sc.nextInt();
			int x = sc.nextInt();
			int y = sc.nextInt();
			int sx[] = new int[n];
			int sy[] = new int[n];
			for (int i = 0; i < n; i++) {
				sx[i] = sc.nextInt();
				sy[i] = sc.nextInt();
			}

			int ans[] = new int[4];
			int ax[] = new int[4];
			int ay[] = new int[4];
			ax[1] = Integer.MAX_VALUE;
			ay[2] = Integer.MAX_VALUE;
			ay[3] = Integer.MAX_VALUE;
			for (int i = 0; i < n; i++) {
				if (sx[i] < x) {
					ans[0]++;
					ax[0] = x-1;
					ay[0] = y;
				}
				if (sx[i] > x) {
					ans[1]++;
					ax[1] = x+1;
					ay[1] = y;
				}
				if (sy[i] > y) {
					ans[2]++;
					ax[2] = x;
					ay[2] = y+1;
				}
				if (sy[i] < y) {
					ans[3]++;
					ax[3] = x;
					ay[3] = y-1;
				}
			}
			// System.out.println(ax[3]+" "+ay[3]);
			int max = 0;
			int zx = 0, zy = 0;
			for (int i = 0; i < 4; i++) {
				if (max < ans[i]) {
					max = ans[i];
					zx = ax[i];
					zy = ay[i];
				}
			}
			System.out.println(max);
			System.out.println(zx + " " + zy);

		}
	}

}
