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.*;
import java.lang.*;

public class Rextester{
    static class Points implements Comparable<Points>{
        int x,y;
        public Points(int x,int y){
            this.x=x;
            this.y=y;
        }
        
        @Override
        public int compareTo(Points o){
            return this.x-o.x;
        }
    }
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st1 = new StringTokenizer(br.readLine());
        int n = new Integer(st1.nextToken());
        Points[] students =new Points[n];
        Points school = new Points(new Integer(st1.nextToken()),new Integer(st1.nextToken()));
        for(int i=0;i<n;i++){
            StringTokenizer st = new StringTokenizer(br.readLine());
            students[i]=new Points(new Integer(st.nextToken()),new Integer(st.nextToken()));
        }
        br.close();
        StringBuffer sb = new StringBuffer();
        int[] quad = new int[4];
        int[] axes = new int[4];
        for(int i=0;i<n;i++){
            if(students[i].x<school.x&&students[i].y>school.y){
                quad[0]++;
            }
            else if(students[i].x>school.x&&students[i].y>school.y){
                quad[1]++;
            }
            else if(students[i].x>school.x&&students[i].y<school.y){
                quad[2]++;
            }
            else if(students[i].x<school.x&&students[i].y<school.y){
                quad[3]++;
            }
            else{
                if(students[i].x==school.x){
                    if(students[i].y>school.y){
                        axes[0]++;
                    }
                    else{
                        axes[2]++;
                    }
                }
                else if(students[i].y==school.y){
                    if(students[i].x>school.x){
                        axes[1]++;
                    }
                    else{
                        axes[3]++;
                    }
                }
            }
        }
        int[] ans = new int[4];
            ans[0]=quad[0]+axes[0]+quad[1];
            ans[1]=quad[1]+axes[1]+quad[2];
            ans[2]=quad[2]+axes[2]+quad[3];
            ans[3]=quad[3]+axes[3]+quad[0];
            //System.out.println(ans[0]+" "+ans[1]+" "+ans[2]+" "+ans[3]);
            int max = Math.max(ans[0],Math.max(ans[1],Math.max(ans[2],ans[3])));
            sb.append(max).append("\n");
            if(max==ans[0]){
                sb.append(school.x).append(" ").append(school.y+1).append("\n");
            }
            else if(max==ans[1]){
                sb.append(school.x+1).append(" ").append(school.y).append("\n");
            }
            else if(max==ans[2]){
                sb.append(school.x).append(" ").append(school.y-1).append("\n");
            }
            else if(max==ans[3]){
                sb.append(school.x-1).append(" ").append(school.y).append("\n");
            }
            System.out.println(sb);
    }
}