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 Main {
    static int s, n, c;
    static long[] mem;
    static int[] arr;

    static class pair implements Comparable<pair> {
        int f;
        int s;

        public pair(int ff, int ss) {
            f = ff;
            s = ss;
        }

        @Override
        public int compareTo(pair o) {
            return s - o.s;
        }
    }

    static long gcd(long a, long b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);

    }

    static long lcm(long a, long b) {
        long res = 1;
        long gcd = gcd(a, b);
        res *= a / gcd;
        return res *= b;
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        StringTokenizer st;
        st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int sx = Integer.parseInt(st.nextToken());
        int sy = Integer.parseInt(st.nextToken());
        int[] x = new int[n];
        int[] y = new int[n];
        for (int i = 0; i < n; i++) {
            st = new StringTokenizer(br.readLine());
            x[i] = Integer.parseInt(st.nextToken());
            y[i] = Integer.parseInt(st.nextToken());
        }
        int px = -1;
        int py = -1;
        int pxx = -1;
        int pyy = -1;
        int max = 0;

        if (sx > 0) {
            int maxx = 0;
            pxx = sx - 1;
            pyy = sy;
            for (int i = 0; i < n; i++) {
                if (x[i] < sx)
                    maxx++;
            }
            if (max < maxx) {
                max = maxx;
                px = pxx;
                py = pyy;
            }
        }
        if(sy>0){
            int maxx = 0;
            pxx = sx ;
            pyy = sy-1;
            for (int i = 0; i < n; i++) {
                if (y[i] < sy)
                    maxx++;
            }
            if (max < maxx) {
                max = maxx;
                px = pxx;
                py = pyy;
            }
        }
        if(sx<(int)(1e9)){
            int maxx = 0;
            pxx = sx + 1;
            pyy = sy;
            for (int i = 0; i < n; i++) {
                if (x[i] > sx)
                    maxx++;
            }
            if (max < maxx) {
                max = maxx;
                px = pxx;
                py = pyy;
            }
        }
        if(sy<(int)(1e9)){
            int maxx = 0;
            pxx = sx ;
            pyy = sy+1;
            for (int i = 0; i < n; i++) {
                if (y[i] > sy)
                    maxx++;
            }
            if (max < maxx) {
                max = maxx;
                px = pxx;
                py = pyy;
            }
        }
        out.println(max);
        if(max>0)
        out.println(px+" "+py);

        out.flush();
    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(String s) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(new File(s)));
        }

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

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public boolean ready() throws IOException {
            return br.ready();
        }
    }
}
