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.awt.Desktop;


import java.io.BufferedReader;


import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URI;
import java.net.URISyntaxException;
import java.sql.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.util.Vector;



public  class codechef3 {
static class comp implements Comparator<Integer>
{

	@Override
	public int compare(Integer o1, Integer o2) {
		if(Math.abs(o1)>Math.abs(o2))
			return -1;
		else return 1;
	
	}
	
	}
      //=======================================================
	  //sorting Pair
   static class comp1 implements Comparator<Pair<Integer,Integer>>
   {

	@Override
	public int compare(Pair<Integer, Integer> o1, Pair<Integer, Integer> o2) {
		if(o1.k>o2.k)
			return 1;
		else return -1;
	
	}

	
	
	}
        //======================================================= 
	   
   //Creating Pair class  
         //----------------------------------------------------------------------
	    
       static class Pair<Integer,Intetger>
       {
    	   int k=0;
    	   int v=0;
    	   public Pair(int a,int b)
    	   {
    		   k=a;
    		   v=b;
    	   }
    	   
    	   
    	   
       }
    
     //--------------------------------------------------------------------------
	
		 static class FastReader
		    {BufferedReader br; 
		        StringTokenizer st; 
		 public FastReader() 
		        {  br = new BufferedReader(new
		                     InputStreamReader(System.in)); 
		        } 
		  
		       String next() 
		        { 
		            while (st == null || !st.hasMoreElements()) 
		            { 
		                try
		                { 
		                    st = new StringTokenizer(br.readLine()); 
		                } 
		                catch (IOException  e) 
		                { 
		                    e.printStackTrace(); 
		                } 
		            } 
		            return st.nextToken(); 
		        } 
		  
		        int nextInt() 
		        { 
		            return Integer.parseInt(next()); 
		        } 
		  
		        long nextLong() 
		        { 
		            return Long.parseLong(next()); 
		        } 
		  
		        double nextDouble() 
		        { 
		            return Double.parseDouble(next()); 
		        } 
		  
		        String nextLine() 
		        { 
		            String str = ""; 
		            try
		            { 
		                str = br.readLine(); 
		            } 
		            catch (IOException e) 
		            { 
		                e.printStackTrace(); 
		            } 
		            return str; 
		        } 
		    } 
		
		 //gcd of two number
		 
		    public static int gcd(int a, int b)
		    {
		      if (b == 0)
		        return a;
		      return gcd(b, a % b); 
		    }
		    
		 //--------------------------------------------------------------------------------------------
		 
		 //lcm of two number
		 static int x;
		    public static int lcm(int a, int b)
		    {
		        return (a / gcd(a, b)) * b;
		    }
		 
		  //-------------------------------------------------------------------------------------------
		   
		 
		    
		    public static void main(String[] args) 
		    {
		    	FastReader s=new FastReader();
				//int t=s.nextInt();
				
				
				{
					
					
					int n=s.nextInt();
					int x=s.nextInt();
					int y=s.nextInt();
					int[] c=new int[4];
					
					while(n-->0)
					{
						int x1=s.nextInt();
						int y1=s.nextInt();
						if(x1<x)
							c[0]++;
						if(x1>x)
							c[1]++;
						if(y1<y)
							c[2]++;
						if(y1>y)
							c[3]++;
					}
					
					
					
					int max=Integer.MIN_VALUE;
					
					for(int i=0;i<4;i++)
						max=Math.max(max, c[i]);
					
					System.out.println(max);
					if(max==c[0])
						System.out.println((x-1)+" "+y);
					else
					if(max==c[1])
						System.out.println((x+1)+" "+y);
					else
					if(max==c[2])
						System.out.println((x)+" "+(y-1));
					else if(max==c[3])
						System.out.println((x)+" "+(y+1));
					
					
					
					
					
				}
		    	
		    	
		    
		    	
		    	
		    	
}}