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

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
	    int  n=s.nextInt();
		long sx=s.nextLong();
		long sy=s.nextLong();
		
		tempx[] ans= new tempx[n];
		for(int i=0;i<n;i++) {
			tempx t= new tempx();
			t.x=s.nextLong();
			t.y=s.nextLong();
			ans[i]=t;
		}
		 int countxp=0;
		 int countxn=0;
		 int countyp=0;
		 int countyn=0;
		 for(int i=0;i<n;i++) {
			 if(ans[i].x>sx) {
				 countxp++;
			 }
			 if(ans[i].x<sx) {
				 countxn++;
			 }
			 if(ans[i].y>sy) {
				 countyp++;
			 }
			 if(ans[i].y<sy) {
				 countyn++;
			 }
			 
		 }
		 int max=Math.max(countxp, Math.max(countxn, Math.max(countyp, countyn)));
		 if(max==countxp) {
			 System.out.println(countxp);
			 System.out.println(sx+1+" "+sy);
			 
		 }else {
			 if(max==countxn) {
				 System.out.println(countxn);
				 System.out.println(sx-1+" "+sy);
			 }else {
				 if(max==countyp) {
					 System.out.println(countyp);
					 System.out.println(sx+" "+sy+1);
				 }else {
					 System.out.println(countyn);
					 System.out.println(sx+" "+(sy-1));
				 }
			 }
		 }
		
		
		}

	

	}
class tempx{
	long x;
	 long y;
}


