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.*;
import java.util.*;
public class vk18
{
    public static void main(String[]st) throws Exception
    {
    	Scanner scan=new Scanner(System.in);
        //BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        //String[] s;
       	int n,s1,s2,i;
       	n=scan.nextInt();
       	s1=scan.nextInt();
       	s2=scan.nextInt();
       	int a[]=new int[n];
       	int b[]=new int[n];
       	for(i=0;i<n;i++)
       	{
       		a[i]=scan.nextInt();
       		b[i]=scan.nextInt();
       	}
       	int l=0,r=0,u=0,d=0;
       	for(i=0;i<n;i++)
       	{
       		if(a[i] > s1) r++;
       		if(b[i] > s2) u++;
       		if(a[i] < s1) l++;
       		if(b[i] < s2) d++;
       	}
       	int max=Integer.MIN_VALUE,max1=Integer.MIN_VALUE,max2=Integer.MAX_VALUE;
       	max1=Math.max(l,r);
       	max2=Math.max(max1,u);
       	max=Math.max(max2,d);
       	if(max==l) { System.out.println(max); System.out.print((s1-1)+" "+s2); }
       	else if(max==r) { System.out.println(max); System.out.print((s1+1)+" "+s2); }
       	else if(max==u) { System.out.println(max); System.out.print((s1)+" "+(s2+1));}
       	else if(max==d) { System.out.println(max); System.out.print((s1)+" "+(s2-1));}


       
    }
}
