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
/* Rajkin Hossain */

import java.io.*;
import java.util.*;
import static java.lang.Math.*;

public class C {
   
    FastInput k = new FastInput(System.in);
    //FastInput k = new FastInput("/home/rajkin/Desktop/input.txt");
    FastOutput z = new FastOutput();
    
    int n;
    ArrayList<Pair> y;
    
    int sx, sy;
    
    boolean inside(int rx, int ry, Pair p) {
    	int minX = Math.min(p.x, sx);
    	int maxX = Math.max(p.x, sx);
    	
    	int minY = Math.min(p.y, sy);
    	int maxY = Math.max(p.y, sy);
    	
    	if(rx >= minX && rx <= maxX && ry >= minY && ry <= maxY) {
    		return true;
    	}
    	
    	return false;
    }
    
    void startProgram() {
    	while(k.hasNext()) {
    		y = new ArrayList<Pair>();
    		n = k.nextInt();
    		
    		sx = k.nextInt();
    		sy = k.nextInt();
    		
    		while(n-->0) {
    			y.add(new Pair(k.nextInt(), k.nextInt()));
    		}
    		
    		int max = 0;
    		
    		int rX = 0;
    		int rY = 0;
    		
    		int count = 0;
    		int rx = sx - 1;
    		int ry = sy;
    		
    		for(int i = 0; i<y.size(); i++) {
    			Pair p = y.get(i);
    			if(inside(rx, ry, p)) {
    				count++;
    			}
    		}
    		
    		if(count > max) {
    			max = count;
    			rX = rx;
    			rY = ry;
    		}
    		
    		count = 0;
    		rx = sx + 1;
    		ry = sy;
    		
    		for(int i = 0; i<y.size(); i++) {
    			Pair p = y.get(i);
    			if(inside(rx, ry, p)) {
    				count++;
    			}
    		}
    		
    		if(count > max) {
    			max = count;
    			rX = rx;
    			rY = ry;
    		}
    		
    		count = 0;
    		rx = sx;
    		ry = sy - 1;
    		
    		for(int i = 0; i<y.size(); i++) {
    			Pair p = y.get(i);
    			if(inside(rx, ry, p)) {
    				count++;
    			}
    		}
    		
    		if(count > max) {
    			max = count;
    			rX = rx;
    			rY = ry;
    		}
    		
    		count = 0;
    		rx = sx;
    		ry = sy + 1;
    		
    		for(int i = 0; i<y.size(); i++) {
    			Pair p = y.get(i);
    			if(inside(rx, ry, p)) {
    				count++;
    			}
    		}
    		
    		if(count > max) {
    			max = count;
    			rX = rx;
    			rY = ry;
    		}
    		
    		z.println(max);
    		z.println(rX+" "+rY);
    	}
    	
    	z.flush();
    	System.exit(0);
    }
    
    class Pair{
    	int x, y;
    	public Pair(int x, int y) {
    		this.x = x;
    		this.y = y;
    	}
    }
    
    public static void main(String [] args) throws IOException {
        new Thread(null, new Runnable(){
            public void run(){
            	try{ 
            		new C().startProgram();
            	}
            	catch(Exception e){
            		e.printStackTrace();
            	}
            }
        },"Main",1<<28).start();
    }
    

    /* MARK: FastInput and FastOutput */
 
    class FastInput {
        BufferedReader reader;
        StringTokenizer tokenizer;
 
        FastInput(InputStream stream){
            reader = new BufferedReader(new InputStreamReader(stream));
        }
       
        FastInput(String path){
            try {
                reader = new BufferedReader(new FileReader(path));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            tokenizer = null;
        }
 
        String next() {
            return nextToken();
        }
       
        String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
           
            return null;
        }
 
        boolean hasNext(){
            try {
                return reader.ready();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return false;
        }
 
        String nextToken() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                String line = null;
                try {
                    line = reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
                if (line == null) {
                    return null;
                }
                tokenizer = new StringTokenizer(line);
            }
            return tokenizer.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(nextToken());
        }
       
        long nextLong() {
            return Long.valueOf(nextToken());
        }
        
        Integer [] getInputIntegerArray(int n) {
        	
        	Integer [] input = new Integer[n];
        	
        	for(int i = 0; i<n; i++) {
        		input[i] = nextInt();
        	}
        	
        	return input;
        }
        
        long [] getInputLongArray(int n) {
        	
        	long [] input = new long[n];
        	for(int i = 0; i<n; i++) {
        		input[i] = nextLong();
        	}
        	
        	return input;
        }
        
        int [] getInputIntegerArrayOneBasedIndex(int n) {
        	
        	int [] input = new int[n+1];
        	
        	for(int i = 1; i<=n; i++) {
        		input[i] = nextInt();
        	}
        	
        	return input;
        }
        
        long [] getInputLongArrayOneBasedIndex(int n) {
        	
        	long [] input = new long[n+1];
        	
        	for(int i = 1; i<=n; i++) {
        		input[i] = nextLong();
        	}
        	
        	return input;
        }
    }
 
    class FastOutput extends PrintWriter {
		FastOutput() {
			super(new BufferedOutputStream(System.out)); 
		}
		
		public void debug(Object...obj) {
		    System.err.println(Arrays.deepToString(obj));
		}
    }
}
