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

public class Solve {
    FastScanner in;
    PrintWriter out;

    static final int east = 0;
    static final int west = 1;
    static final int south = 2;
    static final int north = 3;
    static final int[] dy = {0, 0, -1, 1};
    static final int[] dx = {1, -1, 0, 0};

    static boolean inBounds(int row, int col, int rows, int cols) {
        return (0 <= row &&
                0 <= col &&
                row < rows &&
                col < cols);
    }

    void solve() {
        int n = in.nextInt();
        int sx = in.nextInt();
        int sy = in.nextInt();
        int[] x = new int[n];
        int[] y = new int[n];
        int[] res = new int[4];
        for (int i = 0; i < n; i++) {
            x[i] = in.nextInt();
            y[i] = in.nextInt();

            if (sx < x[i]) {
                res[east]++;
            }

            if (x[i] < sx) {
                res[west]++;
            }

            if (sy < y[i]) {
                res[north]++;
            }

            if (y[i] < sy) {
                res[south]++;
            }
        }

        int max = 0;
        int resX = -1;
        int resY = -1;
        for (int d = 0; d < 4; d++) {
            if (max < res[d]) {
                max = res[d];
                resX = sx + dx[d];
                resY = sy + dy[d];
            }
        }

        out.println(max);
        out.println(resX + " " + resY);


        // 5
        // 4
        // 3*-+
        // 2+-X*+
        // 1   **
        //  12345
    }

    void run() {
        try {
            in = new FastScanner(new File("Solve.in"));
            out = new PrintWriter(new File("Solve.out"));

            solve();

            out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    void runIO() {

        in = new FastScanner(System.in);
        out = new PrintWriter(System.out);

        solve();

        out.close();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

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

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

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

        int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextLong();
            }
            return a;
        }

        BigInteger nextBigInteger() {
            return new BigInteger(next());
        }

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

        double[] nextDoubleArray(int n) {
            double[] a = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextDouble();
            }
            return a;
        }

    }

    public static void main(String[] args) {
        new Solve().runIO();
    }
}
