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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long n = scan.nextLong();
		long s1 = scan.nextLong();
		long s2 = scan.nextLong();

		long upperCount = 0;
		long lowerCount = 0;
		long leftX = 0;
		long rightX = 0;
		long count = 0;
		for (int i = 0; i < n; i++) {

			long x = scan.nextLong();
			long y = scan.nextLong();

			if (s1 - x > 0)
				leftX++;
			else
				rightX++;

			if (s2 - y > 0)
				lowerCount++;

			else if (s2 - y < 0)
				upperCount++;
			else
				count++;
		}

		if (lowerCount > upperCount) {
			System.out.println(lowerCount + count);
			if (count != 0 && leftX > rightX) {
				System.out.print((s1 - 1) + " " + s2);
			} else if (count != 0 && rightX >= leftX) {
				System.out.print((s1 + 1) + " " + s2);
			} else if (count == 0) {
				System.out.print(s1 + " " + (s2 - 1));

			} else {
				System.out.println(upperCount + count);
				if (count != 0 && leftX > rightX) {
					System.out.print((s1 - 1) + " " + s2);
				} else if (count != 0 && rightX >= leftX) {
					System.out.print((s1 + 1) + " " + s2);
				} else if (count == 0) {
					System.out.print(s1 + " " + (s2 + 1));

				}

			}

		}

	}
}