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.*;
import java.io.*;

public class Main {
	public static void main(final String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int sx = scanner.nextInt();
		int sy = scanner.nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		for (int i = 0; i < n; i++) {
			x[i] = scanner.nextInt();
			y[i] = scanner.nextInt();
		}
		int ax = 0;
		int ay = 0;
		int answer = 0;
		int temp = 0;
		for (int i = 0; i < n; i++) {
			if (x[i] < sx) {
				temp++;
			}
		}
		if (temp > answer) {
			ax = sx - 1;
			ay = sy;
		}
		temp = 0;
		for (int i = 0; i < n; i++) {
			if (x[i] > sx) {
				temp++;
			}
		}
		if (temp > answer) {
			ax = sx + 1;
			ay = sy;
		}
		temp = 0;
		for (int i = 0; i < n; i++) {
			if (y[i] < sy) {
				temp++;
			}
		}
		if (temp > answer) {
			ax = sx;
			ay = sy - 1;
		}
		temp = 0;
		for (int i = 0; i < n; i++) {
			if (y[i] > sy) {
				temp++;
			}
		}
		if (temp > answer) {
			ax = sx;
			ay = sy + 1;
		}
		System.out.println(answer);
		System.out.println(ax + " " + ay);
	}
}