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.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Codeforces{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int sx=sc.nextInt();
		int sy=sc.nextInt();
		int neg_x_count=0;
		int pos_x_count=0;
		int neg_y_count=0;
		int pos_y_count=0;
		for(int i=0;i<n;i++) {
			int px=sc.nextInt();
			int py=sc.nextInt();
			if(sx-px<0) {
				neg_x_count+=1;
			}
			else if(sx-px>0) {
				pos_x_count+=1;
			}
			if(sy-py<0) {
				neg_y_count+=1;
			}
			else if(sy-py>0) {
				pos_y_count+=1;
			}
		}
		if(neg_x_count>pos_x_count) {
			if(neg_y_count>pos_y_count) {
				System.out.println(Math.max(neg_x_count,neg_y_count));
				if(neg_x_count>neg_y_count) System.out.println(String.valueOf(sx+1)+" "+String.valueOf(sy));
				else System.out.println(String.valueOf(sx)+" "+String.valueOf(sy+1));
			}
			else {
				System.out.println(Math.max(neg_x_count,pos_y_count));
				if(neg_x_count>pos_y_count) System.out.println(String.valueOf(sx+1)+" "+String.valueOf(sy));
				else System.out.println(String.valueOf(sx)+" "+String.valueOf(sy-1));
			}
		}
		else {
			if(neg_y_count>pos_y_count) {
				System.out.println(Math.max(pos_x_count,neg_y_count));
				if(pos_x_count>neg_y_count) System.out.println(String.valueOf(sx-1)+" "+String.valueOf(sy));
				else System.out.println(String.valueOf(sx)+" "+String.valueOf(sy+1));
			}
			else {
				System.out.println(Math.max(pos_x_count,pos_y_count));
				if(pos_x_count>pos_y_count) System.out.println(String.valueOf(sx-1)+" "+String.valueOf(sy));
				else System.out.println(String.valueOf(sx)+" "+String.valueOf(sy-1));
			}
		}
	}
}