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 sc=new Scanner(System.in);
        int n=sc.nextInt();
        int sx=sc.nextInt();
        int sy=sc.nextInt();
        int arr[][]=new int[n][2];
        for(int i=0;i<n;i++)
        {
            arr[i][0]=sc.nextInt();
            arr[i][1]=sc.nextInt();
        }
        int dcntr=0;
        int ucntr=0;
        for(int i=0;i<n;i++)
        {
            if(arr[i][0]<sx)
            dcntr++;
            else if(arr[i][0]>sx)
            ucntr++;
            else
            {
                if(arr[i][1]>sy)
                ucntr++;
                else
                dcntr++;
            }
        }
        if(ucntr>dcntr)
        {
            System.out.println(ucntr);
            long sum1=0,sum2=0;
            for(int i=0;i<n;i++)
            {
                if(arr[i][0]>sx)
                    ucntr++;
                else
                {
                    if(arr[i][1]>sy)
                    ucntr++;
                    else
                    dcntr++;
                }
            }
            System.out.println((sx+1)+" "+sy);
        }
        else
        {
            System.out.println(dcntr);
            System.out.println((sx-1)+" "+(sy));
        }
    }
}