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

public class C {

    public static void main(String[] args) throws Exception {
        // FileInputStream inputStream = new FileInputStream("input.txt");
        // FileOutputStream outputStream = new FileOutputStream("output.txt");

        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        Solver solver = new Solver(); 
        solver.solve(1, in, out);
        out.close();
    }

    static class Solver {


        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] x = new int[n];
            int[] y = new int[n];
            int sx = in.nextInt();
            int sy = in.nextInt();
            for (int i = 0 ; i < n ; i++) {
                x[i] = in.nextInt();
                y[i] = in.nextInt();
            }
            int[] cnt = new int[4];
            int px, py;
            px = sx + 1;
            py = sy;
            if (px < 0 || px > 1000000000 || py < 0 || py > 1000000000) {
            } else {
                for (int i = 0 ; i < n ; i++) {
                    if (x[i] >= px) {
                        cnt[0]++;
                    }
                }    
            }

            px = sx - 1;
            py = sy;
            if (px < 0 || px > 1000000000 || py < 0 || py > 1000000000) {
            } else {
                for (int i = 0 ; i < n ; i++) {
                    if (x[i] <= px) {
                        cnt[1]++;
                    }
                }    
            }            

            px = sx;
            py = sy + 1;
            if (px < 0 || px > 1000000000 || py < 0 || py > 1000000000) {
            } else {
                for (int i = 0 ; i < n ; i++) {
                    if (y[i] >= py) {
                        cnt[2]++;
                    }
                }    
            }

            px = sx;
            py = sy - 1;
            if (px < 0 || px > 1000000000 || py < 0 || py > 1000000000) {
            } else {
                for (int i = 0 ; i < n ; i++) {
                    if (y[i] <= py) {
                        cnt[3]++;
                    }
                }    
            }

            int maxIndex = 0;
            for (int i = 0 ; i < 4 ; i++) {
                if (cnt[i] > cnt[maxIndex]) maxIndex = i;
            }
            out.println(cnt[maxIndex]);
            if (maxIndex == 0) {
                out.println((sx + 1) + " " + sy);
            } else if (maxIndex == 1) {
                out.println((sx - 1) + " " + sy);
            } else if (maxIndex == 2) {
                out.println(sx + " " + (sy + 1));
            } else {
                out.println(sx + " " + (sy - 1));
            }
            
        }



    }

    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());
        }

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

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

        public float nextFloat() {
            return Float.parseFloat(next());
        }
    }
}
