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
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package Practice_1300;

import java.io.*;

/**
 *
 * @author Akhilesh
 */
public class C1271 {
    public static void main(String[] args) throws IOException {
        BufferedReader scan = new BufferedReader(new InputStreamReader(System.in));

        String str[] = scan.readLine().split("\\s+");
        int n = Integer.parseInt(str[0]);
        int x = Integer.parseInt(str[1]);
        int y = Integer.parseInt(str[2]);
        
        int up = 0, left = 0, right = 0,down = 0;
        
        for(int i = 0; i < n; i++){
            str = scan.readLine().split("\\s+");
            int a = Integer.parseInt(str[0]);
            int b = Integer.parseInt(str[1]);
            
            if(a < x && b < y){
                left++;
                down++;
            }
            if(a < x && b > y){
                left++;
                up++;
            }
            
            if(a > x && b < y){
                right++;
                down++;
            }
            if(a > x && b > y){
                right++;
                up++;
            }
            
            if(a == x){
                if(b < y){
                    down++;
                }else
                    up++;
            }
            if(b == y){
                if(a < x){
                    left++;
                }else
                    right++;
            }
        }
        int sx = 0, sy = 0;
        int max = 0;
        
        if(left >= right){
            sx = x-1;
            sy = y;
            max = left;
        }else{
            sx = x+1;
            sy = y;
            max = right;
        }
            
        if(max < up){
            sx = x;
            sy = y+1;
            max = up;
        }
        
        if(max < down){
            sx = x;
            sy = y-1;
            max = down;
        }
        
        System.out.println(max);
        System.out.println(sx + " " + sy);
    }    
}
