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
/******************************************************************************

                            Online Java Compiler.
                Code, Compile, Run and Debug java program online.
Write your code in this editor and press "Run" button to execute it.

*******************************************************************************/
import java.io.*;
import java.util.*;
public class Main
{
    static int k=1000000000;
	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tk=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(tk.nextToken());
		int sx=Integer.parseInt(tk.nextToken());
		int sy=Integer.parseInt(tk.nextToken());
		int c[]=new int[4];
		for(int i=0;i<n;i++)
		{
		    tk=new StringTokenizer(br.readLine());
		    int x=Integer.parseInt(tk.nextToken());
		    int y=Integer.parseInt(tk.nextToken());
		    if(x<=sx-1)
		    c[0]++;
		    if(x>=sx+1)
		    c[2]++;
		    if(y>=sy+1)
		    c[1]++;
		    if(y<=sy-1)
		    c[3]++;
		}
		int max=-1;int node=-1;
		int v1[]={-1,0,1,0};
		int v2[]={0,1,0,-1};
		for(int i=0;i<4;i++)
		{
		    
		    if(c[i]>max)
		    {
		        int x11=sx+v1[i];
		        int y11=sy+v2[i];
		        if((x11>=0)&&(y11>=0)&&(x11<=k)&&(y11<=k))
		        max=c[i];node=i;
		    }
		}
		System.out.println(max);
		if(node==0)
		{
		    System.out.println((sx-1)+" "+(sy));
		}
		else if(node==1)
		System.out.println((sx)+" "+(sy-1));
		else if(node==2)
		System.out.println((sx+1)+" "+(sy));
		else
		System.out.println((sx)+" "+(sy-1));
	}
}
