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 B608 {
    static final FastScanner in = new FastScanner();
    static final PrintWriter out = new PrintWriter(System.out);

    public static void solve() {

    }

    public static void main(String[] args) throws IOException {
        int students = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();

        int max = 0;
        String maxs = "";
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (int i = 0; i < students; i++) {
            int x1 = in.nextInt();
            int y1 = in.nextInt();
            String s = x1 + "#" + y1;

            if (x1 < x) {
                if (y1 < y) {
                    map.put((x - 1) + "#" + y, map.getOrDefault((x - 1) + "#" + y, 0) + 1);
                    map.put(x + "#" + (y - 1), map.getOrDefault(x + "#" + (y - 1), 0) + 1);
                } else {
                    map.put((x - 1) + "#" + y, map.getOrDefault((x - 1) + "#" + y, 0) + 1);
                    map.put(x + "#" + (y + 1), map.getOrDefault(x + "#" + (y + 1), 0) + 1);
                }
            } else {
                if (y1 < y) {
                    map.put((x + 1) + "#" + y, map.getOrDefault((x + 1) + "#" + y, 0) + 1);
                    map.put(x + "#" + (y - 1), map.getOrDefault(x + "#" + (y - 1), 0) + 1);
                } else {
                    map.put((x + 1) + "#" + y, map.getOrDefault((x + 1) + "#" + y, 0) + 1);
                    map.put(x + "#" + (y + 1), map.getOrDefault(x + "#" + (y + 1), 0) + 1);
                }
            }

        }

        for (String s: map.keySet()) {
            if (map.get(s) > max) {
                maxs = s;
                max = map.get(s);
            }
        }

        out.println(max);
        int i = 0;
        while (i < maxs.length() && maxs.charAt(i) != '#') {
            i++;
        }

        out.print(maxs.substring(0, i) + " " + maxs.substring(i + 1, maxs.length()));



        in.close();
        out.close();
    }



    public static class FastScanner {
        BufferedReader buffReader;
        StringTokenizer tokenizer;

        public FastScanner() {
            buffReader = new BufferedReader(new InputStreamReader(System.in), 32768);
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreElements()) {
                try {
                    tokenizer = new StringTokenizer(buffReader.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return tokenizer.nextToken();
        }

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

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

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

        String nextLine(){
            String str = "";
            try {
                str = buffReader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        void close() {
            try {
                buffReader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
