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.io.IOException;
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);
        CShawarmaTent solver = new CShawarmaTent();
        solver.solve(1, in, out);
        out.close();
    }

    static class CShawarmaTent {
        PrintWriter out;
        InputReader in;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.out = out;
            this.in = in;
            int n = ni(), sx = ni(), sy = ni();
            Tuple[] arr = new Tuple[n];
            int i = 0;
            for (i = 0; i < n; i++)
                arr[i] = new Tuple(ni(), ni());
            int[][] dir = new int[][]{{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
            int[] houses = new int[4];
            for (i = 0; i < 4; i++) {
                if (sx + dir[i][0] < 0 || sx + dir[i][0] > (int) 1e9)
                    continue;
                if (sy + dir[i][1] < 0 || sy + dir[i][1] > (int) 1e9)
                    continue;
                int x = sx + dir[i][0];
                int y = sy + dir[i][1];
                for (int j = 0; j < n; j++) {
                    if (Math.abs(sx - arr[j].x) + Math.abs(sy - arr[j].y) == Math.abs(sx - x) + Math.abs(sy - y) + Math.abs(x - arr[j].x) + Math.abs(y - arr[j].y))
                        houses[i]++;
                }
            }
            int ans = 0, ind = -1;
            for (i = 0; i < 4; i++) {
                if (ans < houses[i]) {
                    ans = houses[i];
                    ind = i;
                }
            }
            pn(ans);
            pn(sx + dir[ind][0] + " " + (sy + dir[ind][1]));

        }

        int ni() {
            return in.nextInt();
        }

        void pn(long zx) {
            out.println(zx);
        }

        void pn(String zx) {
            out.println(zx);
        }

        class Tuple {
            int x;
            int y;

            Tuple(int a, int b) {
                x = a;
                y = b;
            }

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new UnknownError();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new UnknownError();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

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

        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}

