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.*; import java.io.*;
public class Main{
    public static void main(String[] args) throws Exception{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer stt;
        stt=new StringTokenizer(br.readLine());
        long n=Long.parseLong(stt.nextToken()), shl_x=Long.parseLong(stt.nextToken()), shl_y=Long.parseLong(stt.nextToken());
        long count_upper=0, count_lower=0, count_left=0, count_right=0;
        for(int i=0; i<n; i++){
            stt=new StringTokenizer(br.readLine());
            long x=Long.parseLong(stt.nextToken()), y=Long.parseLong(stt.nextToken());
            if(x>shl_x+1) count_right++;
            if(x<shl_x-1) count_left++;
            if(y>shl_y-1) count_upper++;
            if(y<shl_y+1) count_lower++;
        }
        if(count_upper>count_lower && count_upper>count_left && count_upper>count_right){
            System.out.println(count_upper); shl_y++; System.out.println(shl_x+" "+shl_y);
        }
        else if(count_lower>count_upper && count_lower>count_left && count_lower>count_right){
            System.out.println(count_lower); shl_y--; System.out.println(shl_x+" "+shl_y);
        }
        else if(count_left>count_upper && count_left>count_lower && count_left>count_right){
            System.out.println(count_left); shl_x--; System.out.println(shl_x+" "+shl_y);
        } 
        else{
            System.out.println(count_right); shl_x++; System.out.println(shl_x+" "+shl_y);
        }
        return;
    }
}