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 Main
{
    public static void main(String[] args)
    {
        Scanner s = new Scanner(System.in);

        int n = s.nextInt();
        int x = s.nextInt();
        int y = s.nextInt();
        int[] arr = new int[2*n];

        for(int i=0;i<2*n;i++)
            arr[i]=s.nextInt();

        int[] q = new int[4];

        for(int i=0;i<2*n;i=i+2){

            if(arr[i]>x && arr[i+1]>y){
                q[0]++;
                q[1]++;
            }else if(arr[i]<x && arr[i+1]>y){
                q[1]++;
                q[2]++;
            }else if(arr[i]<x && arr[i+1]<y){
                q[2]++;
                q[3]++;
            }else if(arr[i]>x && arr[i+1]<y){
                q[3]++;
                q[0]++;
            }else if(arr[i]==x && arr[i+1]>y){
                q[1]++;
            }else if(arr[i]==x && arr[i+1]<y){
                q[3]++;
            }else if(arr[i]>x && arr[i+1]==y){
                q[0]++;
            }else if(arr[i]<x && arr[i+1]==y){
                q[2]++;
            }
        }

        int largest = q[0];
        int index=0;
        for(int i=1;i<4;i++){
            if(q[i]>largest){
                largest=q[i];
                index=i;
            }
        }

        int l=0,m=0;

        if(index==0){
            l=x+1;
            m=y;
        }else if(index==1){
            l=x;
            m=y+1;
        }else if(index==2){
            l=x-1;
            m=y;
        }else{
            l=x;
            m=y-1;
        }

        System.out.println(largest);
        System.out.println(l + " " + m);
    }
}


