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.*; 
  
public class Codeforces {
 
	
	public static void main(String[] args)  {
		Scanner s = new Scanner(System. in);
// 		int t = 1;
	
// 			while(t>0) {
			int n=s.nextInt();
			
			long x=s.nextInt();
			long y=s.nextInt();
			long x1=x-1,y1=y,x2=x,y2=y+1,x3=x+1,y3=y,x4=x,y4=y-1;
		int c1=0,c2=0,c3=0,c4=0;
		for(int i=0;i<n;i++){
		    long a=s.nextLong();
		    long b=s.nextLong();
		    if(a==x){
		        if(b>y)
		        c2++;
		        else
		        c4++;
		    }
		    if(b==y){
		        if(a<x)
		        c1++;
		        else
		        c3++;
		    }
		    if(a<x&&b!=y){
		        if(b<y)
		        {
		            c1++;c4++;
		        }
		        else{
		            c1++;c2++;
		        }
		    }else if(a>x&&b!=y){
		        if(b<y){
		            c3++;c4++;
		        }else{
		            c3++;c2++;
		        }
		    }
		   
		}
		int max=Math.max(c1,Math.max(c2,Math.max(c3,c4)));
		System.out.println(max);
		if(max==c1){
		    System.out.println(x1+" "+y1);
		}else if(max==c2){
		    System.out.println(x2+" "+y2);
		}else if(max==c3){
		    System.out.println(x3+" "+y3);
		}else if(max==c4){
		    System.out.println(x4+" "+y4);
		}
			   
		//	}
				
				
		
	}
}