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
//package dec15;

import java.io.*;
import java.util.StringTokenizer;

public class C {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        find(in,out);
        out.close();
    }

    private static void find(InputReader in, PrintWriter out) {
        int quantity = in.nextInt();
        int schoolX = in.nextInt();
        int schoolY = in.nextInt();
        int left = 0;
        int right = 0;
        int up = 0;
        int down = 0;

        for(int i=0;i<quantity;i++){
            int x = in.nextInt();
            int y = in.nextInt();
            if(x >= schoolX+1){
                right+=1;
            }else if(x<=schoolX-1){
                left+=1;
            }else if(y >=schoolY+1){
                up+=1;
            }else{
                down+=1;
            }
        }
        int max = Math.max(left,Math.max(right,Math.max(down,up)));
        if(max == right){
            out.println(max);
            out.println(schoolX+1 + " "+schoolY);
        }else if(max == left){
            out.println(max);
            out.println(schoolX-1 + " "+schoolY);
        }else if(max == up){
            out.println(max);
            out.println(schoolX + " "+schoolY+1);
        }else{
            out.println(max);
            out.println(schoolX + " "+(schoolY-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());
        }

    }
}
