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;
import java.util.Vector;

public class ProblemC {
	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();
		int sx = sc.nextInt();
		int sy = sc.nextInt();

		int[][] s = new int[n][2];

		int a = 0, b = 0, c = 0, d = 0;
		int minA = Integer.MAX_VALUE;
	
		int minB = Integer.MAX_VALUE;

		int minC = Integer.MIN_VALUE;

		int minD = Integer.MIN_VALUE;


		for (int i = 0; i < n; i++) {
			int x = s[i][0] = sc.nextInt();
			int y = s[i][1] = sc.nextInt();

			if(x>sx) {
				a++;
				if(x<minA) minA = x;
			}
			if(y>sy) {
				b++;
				if(y<minB) minB = y;
			}
			if(x<sx) {
				c++;
				if(x>minC) minC = x;
			}
			if(y<sy) {
				d++;
				if(y>minD) minD = y;
			}
		}

		if(a>=b && a>=c && a>=d) {
			System.out.println(a);
			System.out.println(minA + " " + (sy));
		}else if(b>=a && b>=c && b>=d) {
			System.out.println(b);
			System.out.println((sx) + " " + minB);
		}else if(c>=b && c>=a && c>=d) {
			System.out.println(c);
			System.out.println(minC + " " + (sy));
		}else if(d>=b && d>=c && d>=a) {
			System.out.println(d);
			System.out.println((sx) + " " + minD);
		}

	}
}
