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.*;
    public class Hello {
    	public static long primeFactors(int n) 
        { 
    		long c = 0;
            // Print the number of 2s that divide n 
            while (n % 2 == 0) { 
                c++;
                n /= 2; 
            } 
      
            // n must be odd at this point.  So we can 
            // skip one element (Note i = i +2) 
            for (int i = 3; i <= Math.sqrt(n); i += 2) { 
                // While i divides n, print i and divide n 
                while (n % i == 0) { 
                    c++;
                    n /= i; 
                } 
            } 
      
            // This condition is to handle the case whien 
            // n is a prime number greater than 2 
            if (n > 2) 
                c++;
            return c;
        }
    	static long A = 1000000000+7;
    	public static void main(String[] args) {
    		Scanner sc = new Scanner(System.in);
    		int n = sc.nextInt();
    		int sx = sc.nextInt();
    		int sy = sc.nextInt();
    		int u = 0;
    		int d = 0;int l = 0;int r = 0;
    		for(int i=0;i<n;i++) {
    			int x = sc.nextInt();
    			int y = sc.nextInt();
    			if(x<sx)l++;
    			if(x>sx)r++;
    			if(y>sy)u++;
    			if(y<sy)d++;
    			//System.out.println(u+" " +d +" " + l + " " + r);
    		}
    		int res = Math.max(Math.max(u, d), Math.max(l, r));
    		System.out.println(res);
    		if(u==res) {
    			System.out.println(sx+" " + (sy+1));
    		}else if(d==res) {
    			System.out.println(sx+" "+(sy-1));
    		}else if(l==res) {
    			System.out.println((sx-1)+" " + sy);
    		}else {
    			System.out.println((sx+1)+" " + sy);
    		}
    	}
    }