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 p608C {


    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);

        int n=sc.nextInt();
        int p=sc.nextInt();
        int q=sc.nextInt();
        String s=sc.nextLine();
        int a=0,b=0,c=0,d=0;
        for(int i=0;i<n;i++){
            int x=sc.nextInt();
            int y=sc.nextInt();
            if(p-1>=x){
                a++;
            }
            if(p+1<=x){
                b++;
            }
            if(q-1>=y){
                c++;
            }
            if(q+1<=y){
                d++;
            }

        }
        int ans=0;
        int x=0,y=0;
        if(a>b){
            ans=a;
            x=p-1;
            y=q;
        }
        else{
            ans=b;
            x=p+1;
            y=q;
        }

        if(ans<c){
            ans=c;
            x=p;
            y=q-1;
        }
        if(ans<d){
            ans=d;
            x=p;
            y=q+1;
        }


        System.out.println(ans);
        System.out.println(x+" "+y);





    }

}


