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 ShawarmaTent{
    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 xaxis[]=new int[n];
        int yaxis[]=new int[n];
        int x=0,y=0;
        
        for(int i=0;i<n;i++){
            xaxis[i]=sc.nextInt();
            yaxis[i]=sc.nextInt();
        }
        
        for(int i=0;i<n;i++){
            if(xaxis[i]==sx)
                x++;
            if(yaxis[i]==sy)
                y++;
        }
        
        int rx,ry,count;
        int a=0,b=0,l=0,r=0;
        if(x>=y){
            rx=sx;
            for(int i=0;i<n;i++){
                if(yaxis[i]>=sy)
                    a++;
                if(yaxis[i]<=sy)
                    b++;
            }
            if(a>=b){
                count=a;
                ry=sy+1;
            }
            else{
                count=b;
                ry=sy-1;
            }
        }
        else{
            ry=sy;
            for(int i=0;i<n;i++){
                if(xaxis[i]>=sx)
                    r++;
                if(xaxis[i]<=sx)
                    l++;
            }
            if(l>=r){
                count=l;
                rx=sx-1;
            }
            else{
                count=r;
                rx=sx+1;
            }
        }
        System.out.println(count);
        System.out.println(rx+" "+ry);
    }
}
