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 lab8 
	
	{
	int FindMin(int a, int b, int c, int d) {
	    int min1 = (a>b)?a:b;
	    int min2 = (c>d)?c:d;
	    return (min1>min2)?min1:min2;
	}
	public static void main(String as[])
	{
	Scanner z=new Scanner(System.in);
	int n=z.nextInt();
	long c1=z.nextInt();
	long c2=z.nextInt();
	int a1=0,a2=0,a3=0,a4=0;
	int m1=0,m2=0,m3=0,m4=0,i;
	for(i=0;i<n;i++)
	{
	long p1=z.nextInt();
	long p2=z.nextInt();
	if(p1>c2)
	{
		
	if(p2>c2)
	m2++;
	if(p2<c2)
	m1++;
	if(p2==c2)
	a1++;
	}
	if(p1<c1)
	{
		
	if(p2>c2)
	m3++;
	if(p2<c2)
	m4++;
	if(p2==c2)
	a3++;
	}
	if(p1==c1)
	{
		
	if(p2>c2)
	a2++;
	if(p2<c2)
	a4++;
	}
	}
	lab8 ob=new lab8();
	long ma=ob.FindMin(m1+a1+m2,m2+a2+a3,m3+a3+a4,m4+a4+m1);
System.out.println(ma);
	i=0;
	if(m1+a1+m2==ma && i==0)
	{
        i++;
	System.out.println((c1+1)+" "+c2);
	}
	

	if(m3+a2+m2==ma && i==0)
	{
        i++;
	System.out.println(c1+" "+(c2+1));
        }

        if(m3+a3+m4==ma && i==0)
	{
        i++;
	System.out.println((c1-1)+" "+c2);
	}

        if(m4+a4+m1==ma && i==0)
	{
	System.out.println(c1+" "+(c2-1));
	}

	}
	}
