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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;

public class test {
	
	
public static void main (String args[]) throws IOException {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer s=new StringTokenizer(br.readLine());
	long n = Long.parseLong(s.nextToken());
	long sx = Long.parseLong(s.nextToken());
	long sy = Long.parseLong(s.nextToken());
	//long[][]r=new int[n][];
	
	long v=n;
	int i=0;
	long sumwes=0;
	long sumest=0;
	long sumnor=0;
	long sumsth=0;
	
	while(v-->0) {
		StringTokenizer st=new StringTokenizer(br.readLine());
		long rx=Long.parseLong(st.nextToken());
		long ry=Long.parseLong(st.nextToken());
		if(rx<sx)
			sumwes++;
		 if(rx>sx)
			sumest++;
		 if(ry>sy)
			sumnor++;
		 if(ry<sy)
			sumsth++;
	}
	long max=Math.max(Math.max(sumwes,sumest), Math.max(sumnor,sumsth));
	System.out.println(max);
	if(sumwes==max)
		System.out.println(--sx+" "+sy);
		
		
	else if(sumest==max)
		System.out.println(++sx+" "+sy);
		
	else if(sumnor==max)
			System.out.println(sx+" "+ ++sy);
			
	else if(sumsth==max)
		System.out.println(sx+" "+--sy);
		
	
}
}