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
// No sorceries shall prevail. //           
import java.util.Scanner; 
import java.io.PrintWriter;
import java.util.Arrays;

public class InVoker {	
	
	public static void main(String args[]) {
		
		Scanner inp=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		
		int n=inp.nextInt();
		long sx=inp.nextLong();
		long sy=inp.nextLong();
		long x[]=new long[n];
		long y[]=new long[n];
		for(int i=0;i<n;i++) {
			x[i]=inp.nextLong();
			y[i]=inp.nextLong();
		}
		int X[]= {0,0,1,-1};
		int Y[]= {1,-1,0,0};
		int gg=0;
		int max=0;
		for(int i=0;i<4;i++) {
			long cx=sx+X[i];
			long cy=sy+Y[i];
			int cur=0;
			for(int j=0;j<n;j++) {
				if(y[j]>=cy && i==0)
					cur++;
				if(i==1 && y[j]<=cy)
					cur++;
				if(i==2 && x[j]>=cx)
					cur++;
				if(i==3 && x[j]<=cx)
					cur++;
			}
			if(cur>max) {
				max=cur;
				gg=i+1;
			}
		}
		out.println(max);
		out.println((sx+X[gg-1])+" "+(sy+Y[gg-1]));
		out.close();
		inp.close();
	}

}