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 org.w3c.dom.ls.LSOutput;

import java.util.*;

public class Main {

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

        int n = scan.nextInt();
        int sx = scan.nextInt();
        int sy = scan.nextInt();

        int smallerX = 0;
        int greaterX = 0;
        int smallerY = 0;
        int greaterY = 0;

        for (int i = 0; i < n; i++) {
            int x = scan.nextInt();
            int y = scan.nextInt();

            if (x > sx) {
                greaterX++;
            } else if(x < sx){
                smallerX++;
            }

            if (y > sy) {
                greaterY++;
            } else if(y < sy){
                smallerY++;
            }
        }

        int max = Math.max(smallerX, Math.max(smallerY, Math.max(greaterX, greaterY)));
        System.out.println(max);

        if (smallerX == max) {
            System.out.println((sx - 1) + " " + sy);
            return;
        }
        if (greaterX == max) {
            System.out.println((sx + 1) + " " + sy);
            return;
        }
        if (smallerY == max) {
            System.out.println(sx + " " + (sy - 1));
            return;
        }
        if (greaterY == max) {
            System.out.println(sx + " " + (sy + 1));
            return;
        }
    }
}