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 Main {
	public static void main(String []args){
		Scanner sc=new Scanner(System.in);
		int n,sx,sy;
		int []a={0,0,0,0,0};
		n=sc.nextInt();
		sx=sc.nextInt();
		sy=sc.nextInt();
		for(int i=0;i<n;i++){
			int x,y;
			x=sc.nextInt();
			y=sc.nextInt();
			if(x>sx) a[1]++;
			if(x<sx) a[2]++;
			if(y>sy) a[3]++;
			if(y<sy) a[4]++;
		}
		int t=0;
		for(int i=1;i<=4;i++){
			if(a[i]>a[t]) t=i;
		}
		System.out.println(a[t]);
		if(t==1){
			System.out.println((sx+1)+" "+sy);
		}
		if(t==2){
			System.out.println((sx-1)+" "+sy);
		}
		if(t==3){
			System.out.println(sx+" "+(sy+1));
		}
		if(t==4){
			System.out.println(sx+" "+(sy-1));
		}
		
	}
}
