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.BufferedReader; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.StringTokenizer; 
  import java.util.*;
 
public class Main 
{ 
    
    public static void main(String[] args) throws IOException 
    { 
  
       BufferedReader br = new BufferedReader( 
                              new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine()); 
        int n = Integer.parseInt(st.nextToken()); 
        int sx = Integer.parseInt(st.nextToken()); 
        int sy = Integer.parseInt(st.nextToken()); 
        int gx=0,lx=0,gy=0,ly=0;
          for(int i=0;i<n;i++){
         StringTokenizer s = new StringTokenizer(br.readLine()); 
        int x = Integer.parseInt(s.nextToken()); 
        int y = Integer.parseInt(s.nextToken()); 
        if(x>sx)
        gx++;
        else if(x!=sx)
        lx++;
        if(y>sy)
        gy++;
        else if(y!=sy)
        ly++;
          }
        int max=Math.max(gx,Math.max(lx,Math.max(gy,ly)));
        if(max==gx){
            System.out.println(gx);
           System.out.print((sx+1)+" "+sy);
        }else if(max==lx){
            System.out.println(lx);
            System.out.print((sx-1)+" "+sy);
        }else if(max==gy){
            System.out.println(gy);
            System.out.print(sx+" "+(sy+1));
        }else if(max==ly){
            System.out.println(ly);
            System.out.print(sx+" "+(sy-1));
        }
       
    }}