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.*;
import java.io.*;

public class Main {


    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(in.readLine());
        int n = Integer.parseInt(st.nextToken());
        int sx = Integer.parseInt(st.nextToken());
        int sy = Integer.parseInt(st.nextToken());

        int up = 0;
        int down = 0;
        int left = 0;
        int right = 0;

        for (int i = 0; i < n; i++) {
            st = new StringTokenizer(in.readLine());
            int x = Integer.parseInt(st.nextToken());
            int y = Integer.parseInt(st.nextToken());
            if (y > sy) {
                up++;
            }
            if (y < sy) {
                down++;
            }
            if (x > sx) {
                right++;
            }
            if (x < sx) {
                left++;
            }
        }

        int res = 0;
        res = Math.max(up, res);
        res = Math.max(down, res);
        res = Math.max(left, res);
        res = Math.max(right, res);
        System.out.println(res);
        if (res == up && sy != 1e9) {
            System.out.println(sx + " " + (sy+1));
        } else if (res == down && sy != 0) {
            System.out.println(sx + " " +(sy-1));
        } else if (res == left && sx != 0) {
            System.out.println((sx-1) + " " + sy);
        } else if (res == right && sx != 1e9) {
            System.out.println((sx+1) + " " + sy);
        }
    }

}
/*

 */
