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 cp1{
	public static void main(String args[]){
		Scanner in=new Scanner (System.in);
		int n=in.nextInt();
		int sx=in.nextInt();
		int sy=in.nextInt();
		int ctr[]=new int[4];
		while(--n>=0){
			int x=in.nextInt();
			int y=in.nextInt();

			
			if(x>sx)
				ctr[0]++;
			if(x<sx)
				ctr[1]++;
			if(y>sy)
				ctr[2]++;
			if(y<sy)
				ctr[3]++;

		}
		int max=0;
		for(int i=0;i<4;i++){
			max=Math.max(max, ctr[i]);
		}
		System.out.println(max);
		if(ctr[0]==max)
			System.out.println((sx+1)+" "+sy);
		else if(ctr[1]==max)
			System.out.println((sx-1)+" "+sy);
		else if(ctr[2]==max)
			System.out.println(sx+" "+(sy+1));
		else if(ctr[3]==max)
			System.out.println(sx+" "+(sy-1));
	}
}