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.*;
 
public class Solution {
	public static void main (String[] args) throws IOException{
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int Sx=s.nextInt();
		int Sy=s.nextInt();
		int[][] coordinates=new int[n][2];
		for(int i=0;i<n;i++)
		{
		    coordinates[i][0]=s.nextInt();
		    coordinates[i][1]=s.nextInt();
		}
		printSteps(coordinates,Sx,Sy);
	}
	public static void printSteps(int[][] coordinates,int Sx,int Sy)
    {
        int[] freqArray=new int[4];
        // 0-l 1-u 2-r 3-d
        
        for(int i=0;i<coordinates.length;i++)
        {
            int actualDistance=distance(Sx,Sy,coordinates[i][0],coordinates[i][1]);
            if(distance(Sx-1,Sy,coordinates[i][0],coordinates[i][1])+1==actualDistance)
            {
                freqArray[0]++;
            }
            if(distance(Sx,Sy+1,coordinates[i][0],coordinates[i][1])+1==actualDistance)
            {
                freqArray[1]++;
            }
            if(distance(Sx+1,Sy,coordinates[i][0],coordinates[i][1])+1==actualDistance)
            {
                freqArray[2]++;
            }
            if(distance(Sx,Sy-1,coordinates[i][0],coordinates[i][1])+1==actualDistance)
            {
                freqArray[3]++;
            }
        }
        int max=Integer.MIN_VALUE;
        int maxPoint=-1;
        for(int i=0;i<4;i++)
        {
            if(freqArray[i]>max)
            {
                max=freqArray[i];
                maxPoint=i;
            }
        }
        
        System.out.println(max);
        if(maxPoint==0)
        {
            System.out.println((Sx-1)+" "+Sy);
        }
        else if(maxPoint==1)
        {
            System.out.println((Sx)+" "+(Sy+1));
        }
        else if(maxPoint==2)
        {
            System.out.println((Sx+1)+" "+(Sy));
        }
        else
        {
            System.out.println((Sx)+" "+(Sy-1));
        }
    }
    public static int distance(int x1,int y1,int x2,int y2)
    {
        return Math.abs(x1-x2)+Math.abs(y1-y2);
    }
}
