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.*;
public class Shwarma
{
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int sx=sc.nextInt();
        int sy=sc.nextInt();
        long ans=0;
        int vx=0,vy=0;
        int a=0,b=0,l=0,r=0;
        for(int i=0;i<n;i++)
        {
            int tx=sc.nextInt();
            int ty=sc.nextInt();

            if(sy+1<=ty && ty!=sy)
                a+=1;
            if(sy-1>=ty && ty!=sy)
                b+=1;
            if(sx-1>=tx && tx!=sx)
                l+=1;
            if(sx+1<=tx && tx!=sx)
                r+=1;
        }
        //System.out.println("a "+a+" b "+b+" l "+l+" r "+r);
        long max=0;
        if(l>r)
        {
            max=l;
            vx=sx-1;
            vy=sy;
        }
        else{
            max=r;
            vx=sx+1;
        vy=sy;}
        ////System.out.println("max "+max);
        if(a>max)
        {
            max=a;
            vx=sx;
            vy=sy+1;
        }
        if(max<b){
            max=b;
            vx=sx;
            vy=sy-1;
        }
        System.out.println(max);
        System.out.println(vx+" "+vy);
    }   
}