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 Solution {
	
	public static void main(String[] args) {

		/*
		 * 1
11 2
10000001001
		 */
		Solution sl=new Solution();
		Scanner scan = new Scanner(System.in);
		int n =scan.nextInt();
		int sx =scan.nextInt();
		int sy =scan.nextInt();
		
		int[] dirs = new int[4];
		/*
		 * 0- +x
		 * 1- -x
		 * 2- +y
		 * 3- -y
		 */
		
		for(int i=0;i<n;i++) {
			int x = scan.nextInt();
			int y=scan.nextInt();
			
			if(x==sx) {
				if(y>sy) dirs[2]++;
				else dirs[3]++;
			}else if(y==sy) {
				if(x>sx) dirs[0]++;
				else dirs[1]++;
			}
			else {
				if(x>sx && y>sy) {
					dirs[2]++;
					dirs[0]++;
				}
				else if(x>sx && y<sy) {
					dirs[3]++;
					dirs[0]++;
				}
				else if(x<sx && y>sy) {
					dirs[2]++;
					dirs[1]++;
				}
				else if(x<sx && y<sy) {
					dirs[3]++;
					dirs[1]++;
				}
			}
		}
		
		int max=0;
		int pos=0;
		for(int i=0;i<4;i++) {
			if(max<dirs[i]) {
				max=dirs[i];
				pos=i;
			}
			//System.out.println("-"+dirs[i]);
		}
		System.out.println(max);
		if(pos==0) System.out.println((sx+1)+" "+sy);
		if(pos==1) System.out.println((sx-1)+" "+sy);
		if(pos==2) System.out.println((sx)+" "+(sy+1));
		if(pos==3) System.out.println((sx)+" "+(sy-1));
		
		
		scan.close();
	}
	
	/*
	 * static final Random random=new Random();
	 * 
	 * static void ruffleSort(int[] a) { int n=a.length; //shuffle, then sort for
	 * for(int i=0; i<n; i++) { int oi=random.nextInt(n), temp=a[oi]; a[oi]=a[i];
	 * a[i]=temp; } Arrays.sort(a); }
	 */
	 
	
}