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.*;import java.math.BigInteger;
public class Main
{
    public static void process()throws IOException
    {
        //Your code here
        int N=ni();
        int X=ni();
        int Y=ni();
        int[]hor=new int[N];
        int[]ver=new int[N];
        for(int i=0;i<N;i++)
        {
            hor[i]=ni();
            ver[i]=ni();
        }
        int ans=0;
        int ansx=0,ansy=0;
        if(count(X+1,Y,hor,ver,X,Y)>ans)
        {
            ans=count(X+1,Y,hor,ver,X,Y);
            ansx=X+1;
            ansy=Y;
        }
        if(count(X+1,Y+1,hor,ver,X,Y)>ans)
        {
            ans=count(X+1,Y+1,hor,ver,X,Y);
            ansx=X+1;
            ansy=Y+1;
        }
        if(count(X,Y+1,hor,ver,X,Y)>ans)
        {
            ans=count(X,Y+1,hor,ver,X,Y);
            ansx=X;
            ansy=Y+1;
        }
        if(count(X-1,Y+1,hor,ver,X,Y)>ans)
        {
            ans=count(X-1,Y+1,hor,ver,X,Y);
            ansx=X-1;
            ansy=Y+1;
        }
        if(count(X-1,Y,hor,ver,X,Y)>ans)
        {
            ans=count(X-1,Y,hor,ver,X,Y);
            ansx=X-1;
            ansy=Y;
        }
        if(count(X-1,Y-1,hor,ver,X,Y)>ans)
        {
            ans=count(X-1,Y-1,hor,ver,X,Y);
            ansx=X-1;
            ansy=Y-1;
        }
        if(count(X,Y-1,hor,ver,X,Y)>ans)
        {
            ans=count(X,Y-1,hor,ver,X,Y);
            ansx=X;
            ansy=Y-1;
        }
        if(count(X+1,Y-1,hor,ver,X,Y)>ans)
        {
            ans=count(X+1,Y-1,hor,ver,X,Y);
            ansx=X+1;
            ansy=Y-1;
        }
        pn(ans+"\n"+ansx+" "+ansy);

    }
    public static int count(int x,int y,int[]hor,int[]ver,int sx,int sy)
    {
        int count=0;
        for(int i=0;i<hor.length;i++)
        {
            if(hor[i]>sx && ver[i]>sy)
            {
                if(x<=hor[i] && x>=sx && y<=ver[i] && y>=sy)
                    count++;
            }
            if(hor[i]<sx && ver[i]>sy)
            {
                if(x>=hor[i] && x<=sx && y<=ver[i] && y>=sy)
                    count++;   
            }
            if(hor[i]<sx && ver[i]<sy)
            {
                if(x>=hor[i] && x<=sx && y>=ver[i] && y<=sy)
                    count++; 
            }
            if(hor[i]>sx && ver[i]<sy)
            {
                if(x<=hor[i] && x>=sx && y>=ver[i] && y<=sy)
                    count++;
            }
            if(hor[i]>sx && ver[i]==sy)
            {

                if(x>sx && x<=hor[i] && y==sy)
                    count++;
            }
            if(hor[i]<sx && ver[i]==sy)
            {
                if(x<sx && x>=hor[i] && y==sy)
                    count++;
            }
            if(hor[i]==sx && ver[i]<sy)
            {
                if(y==sy && y>=ver[i] && y<sy)
                    count++;
            }
            if(hor[i]==sx && ver[i]>sy)
            {
                if(x==sx && y<=ver[i] && y>sy)
                    count++;
            }
        }
       // pn(x+" "+y+" "+count);
        return count;
    }
    static FastReader sc=new FastReader();
    //static AnotherReader sc;

    static boolean multipleTC=false;
    static long mod=1000000007;
    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;}}

    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)));}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

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