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.Scanner;

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 x, y;
        int[] s = new int[4];

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

            if (y > sY) s[0]++;
            if (x > sX) s[1]++;
            if (y < sY) s[2]++;
            if (x < sX) s[3]++;
        }

        int max = s[0], nmax = 0;

        for (int i = 1; i < 4; i++) {
            if (s[i] > max) {
                max = s[i];
                nmax = i;
            }
        }

        switch (nmax) {
            case 0: sY++; break;
            case 1: sX++; break;
            case 2: sY--; break;
            case 3: sX--; break;
        }

        System.out.println(s[nmax]);
        System.out.printf("%d %d\n", sX, sY);
    }
}
