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
{
	static class Node{
		int x,y;
		public Node(int x,int y){
			this.x=x;
			this.y=y;
		}
	}

	public static void process()throws IOException
    {
    	int n=ni(),sx=ni(),sy=ni();
    	Node arr[]=new Node[n+1];
    	for(int i=1;i<=n;i++){
    		arr[i]=new Node(ni(),ni());
    	}

    	ArrayList<Node> right = new ArrayList<>();
    	ArrayList<Node> left = new ArrayList<>();
    	//ArrayList<Node> line = new ArrayList<>();
    	for(int i=1;i<=n;i++){
    		if(arr[i].x>sx)
    			right.add(arr[i]);
    		else if(arr[i].x<sx)
    			left.add(arr[i]);
    	}

    	// if(!line.isEmpty()){

    	// }

    	if(left.size()>right.size()){
    		pn(left.size());
    		pn((sx-1)+" "+(sy));
    	}
    	else{
    		pn(right.size());
    		pn((sx+1)+" "+sy);
    	}
    }

    static FastReader sc=new FastReader();
    //static AnotherReader sc;

    public static void main(String[]args)throws IOException
    {
        //sc=new AnotherReader();
        int t=1;
        while(t-->0)
            process();
        System.out.flush();
        System.out.close();  
    }

    static boolean multipleTC=false;
    static void pn(Object o){System.out.println(o);}
    static void p(Object o){System.out.print(o);}
    static void pni(Object o){System.out.println(o);System.out.flush();}
    static int ni()throws IOException{return sc.nextInt();}
    static long nl()throws IOException{return sc.nextLong();}
    static double nd()throws IOException{return sc.nextDouble();}
    static String nln()throws IOException{return sc.nextLine();}
    static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    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;}}

    static class AnotherReader{BufferedReader br; StringTokenizer st;
    AnotherReader()throws FileNotFoundException{
    br = new BufferedReader(new FileReader("input.txt"));}
    String next()throws IOException{
    while (st == null || !st.hasMoreElements()) {try{
    st = new StringTokenizer(br.readLine());}
    catch (IOException  e){ e.printStackTrace(); }}
    return st.nextToken(); } int nextInt() throws IOException{
    return Integer.parseInt(next());}
    long nextLong() throws IOException
    {return Long.parseLong(next());}
    double nextDouble()throws IOException { return Double.parseDouble(next()); }
    String nextLine() throws IOException{ String str = ""; try{
    str = br.readLine();} catch (IOException e){
    e.printStackTrace();} return str;}}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}