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
// package com.company;
import java.util.*;
import java.lang.*;
import java.io.*;
//****Use Integer Wrapper Class for Arrays.sort()****
public class BE3 {
    public static void main(String[] Args){
        FastReader scan=new FastReader();
        int n=scan.nextInt();
        int sx=scan.nextInt();
        int sy=scan.nextInt();
        s[] arr=new s[n];
        for(int i=0;i<n;i++){
            int x=scan.nextInt();
            int y=scan.nextInt();
            arr[i]=new s(x,y);
        }
        int ans=0;
        ArrayList<Pair> a=new ArrayList<>();
        if(sx>0){
            a.add(new Pair(sx-1,sy));
        }if(sy>0){
            a.add(new Pair(sx,sy-1));
        }if(sx<1000000000){
            a.add(new Pair(sx+1,sy));
        }if(sy<1000000000){
            a.add(new Pair(sx,sy+1));
        }
        Pair pa=a.get(0);
        for(Pair p:a){
            int la=0;
            for(int i=0;i<n;i++){
                if((arr[i].x>sx&&p.x>sx)||(arr[i].x<sx&&p.x<sx)){
                    la++;
                }
                else if((arr[i].y>sy&&p.y>sy)||(arr[i].y<sy&&p.y<sy)){
                    la++;
                }
            }
            if(la>ans){
                ans=la;
                pa=p;
            }
        }
        System.out.println(ans);
        System.out.println(pa.x+" "+pa.y);
    }
    static class Pair{
        int x;
        int y;
        Pair(int x,int y){
            this.x=x;
            this.y=y;
        }
    }
    static class s{
        int x;
        int y;
        s(int x,int y){
            this.x=x;
            this.y=y;
        }
    }
    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;
        }
    }

}
