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.Arrays;
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        int xs = scanner.nextInt();
        int ys = scanner.nextInt();

        int arr[][] = new int[t][2];

        for(int i=0;i<t;i++){
            for(int j=0;j<2;j++){
                arr[i][j] = scanner.nextInt();
            }
        }
        int direction [] = new int[4];
        int countyup = 0;
        int countydw = 0;
        int countxri = 0;
        int countxlf = 0;
        for (int i =0;i<t;i++  ){
            for(int j = 0; j <1;j++){
                if(arr[i][j]>xs){
                    direction[0]++;
                }else if(arr[i][j]<xs) {
                    direction[1]++;
                }
                if(arr[i][j+1]>ys){
                    direction[2]++;
                } else if(arr[i][j+1]<ys){
                    direction[3]++;
                }
            }

        }
        countyup = direction[0];
        countydw = direction[1];
        countxri = direction[2];
        countxlf = direction[3];
      //  System.out.println(countxlf+" " +countxri+" "+countydw+" "+countydw+" "+countyup);
        Arrays.sort(direction);
        //System.out.println("ASDASD");

        if(direction[3]==countxlf){
            System.out.println(countxlf);
            System.out.println((--xs)+" "+ ys);
        }
        if(direction[3]==countxri){
            System.out.println(countxri);
            System.out.println((++xs)+" "+ ys);
        }

        if(direction[3]==countydw){
            System.out.println(countydw);
            System.out.println(xs+" "+(--ys));
        }

        if(direction[3]==countyup){
            System.out.println(countyup);
            System.out.println(xs+" "+(++ys));
        }
       // System.out.println(arr[].toString());
    }
}