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.Scanner;

public class ShwarmaTent {
    public static void main(String argsp[]){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int s1=sc.nextInt();
        int s2=sc.nextInt();
        int less=0;
        int more=0;
        int lessY=0;
        int moreY=0;
        for(int i=0;i<n;++i){
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a<s1){
                less++;
            }
            else if(a>s1){
                more++;
            }
                if(b>s2){
                    moreY++;
                }
                else if(b<s2){
                    lessY++;
                }
            }
        
        int a=Math.abs(more-less);
        int b=Math.abs(moreY-lessY);
        if(a>=b){
            if(more>less){
                System.out.println(more+"\n"+(s1+1)+" "+s2);
            }
            else {
                System.out.println(less+"\n"+(s1-1)+" "+s2);
            }
        }
        else {
            if(moreY>less){
                System.out.println(moreY+"\n"+(s1)+" "+(s2+1));
            }
            else {
                System.out.println(lessY+"\n"+s1+" "+(s2-1));
            }
        }
    }
}
