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

public class P608C {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] line = br.readLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int sx = Integer.parseInt(line[1]);
        int sy = Integer.parseInt(line[2]);
        int northCount = 0;
        int eastCount = 0;
        int southCount = 0;
        int westCount = 0;

        for(int i=0; i<n; i++) {
            line = br.readLine().split(" ");
            int xi = Integer.parseInt(line[0]);
            int yi = Integer.parseInt(line[1]);

            if(xi > sx) {
                eastCount++;
            }
            if(xi < sx) {
                westCount++;
            }
            if(yi > sy) {
                southCount++;
            }
            if(yi < sy) {
                northCount++;
            }
        }

        int max = Math.max(Math.max(northCount, eastCount), Math.max(westCount, southCount));
        System.out.println(max);
        int maxX = sx, maxY = sy;
        if(northCount == max) {
            maxY = sy-1;
        } else if(eastCount == max) {
            maxX = sx+1;
        } else if(westCount == max) {
            maxX = sx-1;
        } else {
            maxY = sy+1;
        }
        System.out.println(maxX + " " + maxY);
    }
}
