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 shawarmatent {
    public static void main(String[] args) throws IOException {
        FastScanner scan = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
        
        int n = scan.nextInt();
        int sx = scan.nextInt();
        int sy = scan.nextInt();
        
        int up = 0;
        int down = 0;
        int right = 0;
        int left = 0;
        
        for (int i = 0; i < n; i++) {
        	int x = scan.nextInt();
        	int y = scan.nextInt();
        	if (x > sx)
        		right++;
        	if (x < sx)
        		left++;
        	if (y > sy)
        		up++;
        	if (y < sy)
        		down++;
        }
        int max = Math.max(Math.max(right, left), Math.max(up, down));
        out.println(max);
        if (right == max) {
        	out.println((sx + 1) + " " + sy);
        }
        else if (left == max) {
        	out.println((sx - 1) + " " + sy);
        }
        else if (up == max) {
        	out.println(sx + " " + (sy + 1));
        }
        else {
        	out.println(sx + " " + (sy - 1));
        }
        
        
        out.close();
    }
    
    public static void shuffle(int[] arr) {
    	Random rgen = new Random();
    	
    	for (int i = 0; i < arr.length; i++) {
    		int rPos = rgen.nextInt(arr.length);
    		int temp = arr[i];
    		arr[i] = arr[rPos];
    		arr[rPos]=temp;
    	}
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

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

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

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