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

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

        int n = scan.nextInt();

        int xSchool = scan.nextInt();
        int ySchool = scan.nextInt();

        int[] xDom = new int[n];
        int[] yDom = new int[n];

        int q1Count = 0;
        int q2Count = 0;
        int q3Count = 0;
        int q4Count = 0;

        for(int i = 0; i < n; i++) {
            xDom[i] = scan.nextInt();
            yDom[i] = scan.nextInt();

            if(xDom[i] < xSchool) {
                q1Count++;
            }
            if(xDom[i] > xSchool) {
                q4Count++;
            }
            if(yDom[i] < ySchool) {
                q3Count++;
            }
            if(yDom[i] > ySchool) {
                q2Count++;
            }
        }

        int max = Math.max(q1Count, q2Count);
        max = Math.max(max, q3Count);
        max = Math.max(max, q4Count);

//        System.out.println("q1 " + q1Count + " q2 " + q2Count + " q3 " + q3Count + " q4 " + q4Count);

        System.out.println(max);
        if(max == q1Count && (xSchool - 1 >= 0)  ) {

            System.out.println( (xSchool - 1) + " " + ySchool);

        } else if(max == q2Count && (ySchool + 1 <= 1000000000)  ) {

            System.out.println(xSchool + " " + (ySchool + 1) );

        } else if(max == q3Count && (xSchool + 1 <= 1000000000)  ) {
            
            System.out.println(xSchool + " " + (ySchool - 1) );

        } else if(max == q4Count && (ySchool - 1 >= 0)  ) {

            System.out.println( (xSchool + 1) + " " + ySchool);

        }
    }
}