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.*;
import java.util.*;
public class A {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        //StringBuilder sb=new StringBuilder();
        //StringTokenizer st=new StringTokenizer(br.readLine());
        //PriorityQueue<Integer> pq=new PriorityQueue<>();
        //HashSet<Integer> hs=new HashSet<>();
        // int q = Integer.parseInt(br.readLine());
        int k =1;
        while (k-- > 0) {
            StringTokenizer st=new StringTokenizer(br.readLine());
            int a= Integer.parseInt(st.nextToken());
            int sx= Integer.parseInt(st.nextToken());
            int sy= Integer.parseInt(st.nextToken());
            LinkedList<Integer>xr1=new LinkedList<>();
            LinkedList<Integer>yr1=new LinkedList<>();
            LinkedList<Integer>xr2=new LinkedList<>();
            LinkedList<Integer>yr2=new LinkedList<>();
            LinkedList<Integer>xr3=new LinkedList<>();
            LinkedList<Integer>yr3=new LinkedList<>();
            LinkedList<Integer>xr4=new LinkedList<>();
            LinkedList<Integer>yr4=new LinkedList<>();
            int r1=0;
            int r2=0;
            int r3=0;
            int r4=0;
            int xr=0;
            int xl=0;
            int yu=0;
            int yd=0;
            while(a-->0){
                st=new StringTokenizer(br.readLine());
                int xx= Integer.parseInt(st.nextToken());
                int yy= Integer.parseInt(st.nextToken());
                if((xx>sx&&yy>sy)||(xx>sx&&yy<sy)){r1++;xr1.addFirst(xx);yr1.addFirst(yy);}
                if((xx<sx&&yy>sy)||(xx<sx&&yy<sy)){r2++;xr2.addFirst(xx);yr2.addFirst(yy);}
                if((xx<sx&&yy<sy)||(xx>sx&&yy<sx)){r3++;xr3.addFirst(xx);yr3.addFirst(yy);}
                if((xx<sx&&yy>sy)||(xx>sx&&yy>sx)){r4++;xr4.addFirst(xx);yr4.addFirst(yy);}
                if((xx==sx&&yy>sy)){yu++;xr4.addFirst(xx);}
                if((xx==sx&&yy<sy)){yd++;xr3.addFirst(xx);}
                if((xx<sx&&yy==sy)){xl++;xr2.addFirst(xx);}
                if((xx>sx&&yy==sy)){xr++;xr1.addFirst(xx);}
            }
            r1+=xr;r2+=xl;r3+=yd;r4+=yu;
            //out.println(r1+" "+r2+" "+r3+" "+r4);
            if(r1>=r2&&r1>=r3&&r1>=r4){
                int s=xr1.size();
                out.println(s);
                out.print(sx+1+" ");out.println(sy);
                continue;
            }
            if(r2>=r1&&r2>=r3&&r2>=r4){
                int s=xr2.size();
                out.println(s);
                out.println(sx-1+" "+sy);
                continue;
            }
            if(r3>=r2&&r3>=r1&&r3>=r4){
                int s=xr3.size();
                out.println(s);
                out.print(sx+" ");out.println(sy-1);

                continue;
            }
            if(r4>=r2&&r4>=r1&&r4>=r3){
                int s=xr4.size();
                out.println(s);
                out.print(sx+" ");out.println(sy);
                continue;
            }
            //out.println(Arrays.toString(c));
            //out.println(r);
            //out.println(Arrays.toString(b));
            //out.println(pq);
        }//out.println();
        out.close();
    }
}