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.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;

public class P15 {
	 public static void main(String args[])
	 {
		 try{
			 
				BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
				
				
					String a[]=br.readLine().split(" ");
					int n=Integer.parseInt(a[0]);
					int x=Integer.parseInt(a[1]);
					int y=Integer.parseInt(a[2]);
					Point arr[]=new Point[n];
					for(int j=0;j<n;j++)
					{
						String  s[]=br.readLine().split(" ");
						arr[j]=new Point(Integer.parseInt(s[0]),Integer.parseInt(s[1]));
					}
					int max=0;
					int u=0,v=0;
				for(int j=0;j<arr.length;j++)
				{
					int count=0;
					int num1=(arr[j].x-x);
					int num2=(arr[j].y-y);
					for(int k=0;k<arr.length;k++)
					{	
						
						if(num1>=0&&num2>0)
						{
							if((arr[j].x>x||arr[j].y>y)&&(arr[j].x<=arr[k].x||arr[j].y<=arr[k].y))
								count ++;
						}
						else if(num1<0&&num2>=0)
						{
							if((arr[j].x<x||arr[j].y>y)&&(arr[j].x>=arr[k].x||arr[j].y<=arr[k].y))
								count ++;
						}
						else if(num1<=0&&num2<0)
						{
							if((arr[j].x<x||arr[j].y<y)&&(arr[j].x>=arr[k].x||arr[j].y>=arr[k].y))
								count ++;
						}
						else
						{
							if((arr[j].x>x||arr[j].y<y)&&(arr[j].x<=arr[k].x||arr[j].y>=arr[k].y))
								count ++;
						}
						
					}
					
					if(count>max)
					{
					max=count;	
					u=arr[j].x;
					v=arr[j].y;
					}
					
				}
					System.out.println(max);
					System.out.println(u+" "+v);
					
				}
				
				
				
				catch(Exception e)
				{
					
				}
	 }

	
}
class Point
{
	int x;
	int y;
	Point(int x,int y)
	{
		this.x=x;
		this.y=y;
	}
	
}
