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.io.*;

public class Solution{

	public static Integer INT(String s) {
		return Integer.parseInt(s);
	}
	public static Long LONG(String s) {
		return Long.parseLong(s);
	}

	static int mod=(int)1e9+7, oo=Integer.MAX_VALUE, _oo=Integer.MIN_VALUE;
	static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));	
	static Scanner in=new Scanner(System.in); 
	static StringBuilder out=new StringBuilder();

	//==================================================================================================================================================


	public static void main(String args[]) throws IOException {

		int n=in.nextInt(), s[]=new int[]{in.nextInt(), in.nextInt()};

		int p[][]=new int[n][2];
		for(int i=0; i<n; i++)
			p[i]=new int[]{in.nextInt(), in.nextInt()};

		int max=0, temp, point[]=new int[2];

		temp=0;
		for(int i=0; i<n; i++)
			if(p[i][1]>=s[1]+1)
				temp+=1;
		if(temp>max) {
			max=temp;
			point=new int[]{s[0], s[1]+1};
		}

		temp=0;
		for(int i=0; i<n; i++)
			if(p[i][1]<=s[1]-1)
				temp+=1;
		if(temp>max) {
			max=temp;
			point=new int[]{s[0], s[1]-1};
		}

		temp=0;
		for(int i=0; i<n; i++)
			if(p[i][0]>=s[0]+1)
				temp+=1;
		if(temp>max) {
			max=temp;
			point=new int[]{s[0]+1, s[1]};
		}

		temp=0;
		for(int i=0; i<n; i++)
			if(p[i][0]<=s[0]-1)
				temp+=1;
		if(temp>max) {
			max=temp;
			point=new int[]{s[0]-1, s[1]};
		}

		System.out.println(max+"\n"+point[0]+" "+point[1]);
	}
}