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.Arrays;
import java.util.Scanner;
public class Main {
//	final static int N = (int) (1e5 + 10);
	static int sum;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int x=sc.nextInt();
		int y=sc.nextInt();
		int a1=0,a2=0,a3=0,a4=0;
		int b1=0,b2=0,b3=0,b4=0;
		for(int i=0;i<n;i++) {
			int c=sc.nextInt()-x;
			int d=sc.nextInt()-y;
			if(c==0) {
				if(d>0) b1++;
				else b3++;
			}
			else if(d==0) {
				if(c>0) b4++;
				else b2++;
			}
			if(c>0&&d>0) a1++;
			if(c>0&&d<0) a4++;
			if(c<0&&d<0) a3++;
			if(c<0&&d>0) a2++;
		}
		int ma=Math.max(Math.max(Math.max(a1+a2+b1,a2+a3+b2),a3+a4+b3),a4+a1+b4);
		System.out.println(ma);
		if(ma==a1+a2+b1)  System.out.println(x+" "+(1+y));
		else if(ma==a2+a3+b2) System.out.println((x-1)+" "+y);
		else if(ma==a3+a4+b3) System.out.println(x+" "+(y-1));
		else System.out.println((x+1)+" "+y);
		sc.close();
	}
}
