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

public class C {

    FastScanner scanner;
    PrintWriter writer;

    void solve() throws IOException {
        scanner = new FastScanner(System.in);
        writer = new PrintWriter(System.out);

        int n = scanner.nextInt();

        Point s = readPoint();
        int candidatesNum = 4;
        Point[] candidates = new Point[candidatesNum];
        candidates[0] = new Point(s.x - 1, s.y);
        candidates[1] = new Point(s.x + 1, s.y);
        candidates[2] = new Point(s.x, s.y - 1);
        candidates[3] = new Point(s.x, s.y + 1);
        int[] passers = new int[candidatesNum];

        int max = 0;
        Point maxarg = candidates[0];

        for (int i = 0; i < n; i++) {
            Point p = readPoint();
            for (int j = 0; j < candidatesNum; j++) {
                if (onPath(p, s, candidates[j]))
                    passers[j]++;

                if (passers[j] > max) {
                    max = passers[j];
                    maxarg = candidates[j];
                }
            }
        }

        writer.println(max);
        writer.println(maxarg.x + " " + maxarg.y);

        writer.close();
    }

    boolean onPath(Point from, Point to, Point p) {
        return inRange(from.x, to.x, p.x) && inRange(from.y, to.y, p.y);
    }

    boolean inRange(int a, int b, int x) {
        if (a > b) {
            int t = a;
            a = b;
            b = t;
        }
        return x >= a && x <= b;
    }

    private Point readPoint() throws IOException {
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        return new Point(x, y);
    }

    static class Point {
        int x;
        int y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    public static void main(String... args) throws IOException {
        new C().solve();
    }

    static class FastScanner {

        BufferedReader br;
        StringTokenizer tokenizer;

        FastScanner(String fileName) throws FileNotFoundException {
            this(new FileInputStream(new File(fileName)));
        }

        FastScanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

        String nextLine() throws IOException {
            tokenizer = null;
            return br.readLine();
        }

        String next() throws IOException {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                String line = br.readLine();
                if (line == null) {
                    return null;
                }
                tokenizer = new StringTokenizer(line);
            }
            return tokenizer.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
    }
}
