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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();
            int sx = in.nextInt();
            int sy = in.nextInt();
            Count cnt = new Count();
            for (int i = 0; i < N; i++) {
                int xi = Integer.signum(in.nextInt() - sx);
                int yi = Integer.signum(in.nextInt() - sy);
                cnt.add(new House(new int[]{xi, yi}));
            }
            int topleftquad = cnt.get(new int[]{-1, 1});
            int toprightquad = cnt.get(new int[]{1, 1});
            int botleftquad = cnt.get(new int[]{-1, -1});
            int botrightquad = cnt.get(new int[]{1, -1});
            int midTop = cnt.get(new int[]{0, 1});
            int midBot = cnt.get(new int[]{0, -1});
            int midLeft = cnt.get(new int[]{-1, 0});
            int midRight = cnt.get(new int[]{1, 0});
            int res = Math.max(midTop + topleftquad + toprightquad, Math.max(midBot + botleftquad + botrightquad, Math.max(topleftquad + midLeft + botleftquad, toprightquad + midRight + botrightquad)));
            out.println(res);
            int coordX;
            int coorY;
            if (res == midTop + topleftquad + toprightquad) {
                coordX = 0;
                coorY = 1;
            } else if (res == toprightquad + midRight + botrightquad) {
                coordX = 1;
                coorY = 0;
            } else if (res == midBot + botleftquad + botrightquad) {
                coordX = 0;
                coorY = -1;
            } else {
                coordX = -1;
                coorY = 0;
            }
            out.println((coordX + sx) + " " + (coorY + sy));

        }

        class Count {
            HashMap<House, Integer> count = new HashMap<>();

            Count() {
                for (int i = -1; i <= 1; i++) {
                    for (int j = -1; j <= 1; j++) {
                        count.put(new House(new int[]{i, j}), 0);
                    }
                }
            }

            void add(House h) {
                count.replace(h, count.get(h) + 1);
            }

            int get(int[] a) {
                return count.get(new House(a));
            }

        }

        class House {
            int[] coord;

            House(int[] coord) {
                this.coord = coord;
            }

            public int hashCode() {
                return Arrays.hashCode(coord);
            }

            public boolean equals(Object o) {
                House h = (House) (o);
                return Arrays.equals(h.coord, coord);
            }

        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }
}

