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.ArrayList;

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 count1=0,count2=0,count3=0,count4=0;
				ArrayList<Point> al1,al2,al3,al4;
				al1=new ArrayList<Point>();
				al2=new ArrayList<Point>();
				al3=new ArrayList<Point>();
				al4=new ArrayList<Point>();
				for(int i=0;i<arr.length;i++)
				{
					
					if(arr[i].x>=x&&arr[i].y>=y)
						{
						count1++;
						al1.add(arr[i]);
						}
					if(arr[i].x<=x&&arr[i].y>=y)
						{
						count2++;
						al2.add(arr[i]);
						}
					if(arr[i].x<=x&&arr[i].y<=y)
						{
						count3++;
						al3.add(arr[i]);
						}
					if(arr[i].x>=x&&arr[i].y<=y) 
					{
						al4.add(arr[i]);
						count4++;
						}
					
				}
				int max=Math.max(count1, Math.max(count2, Math.max(count3, count4)));
				int minx,miny;
					if(max==count1)
					{  minx=al1.get(0).x;
					   miny=al1.get(0).y;
					   System.out.println(al1);
						for(Point p:al1)
						{
						if(p.x<minx)
							minx=p.x;
						if(p.y<miny)
							miny=p.y;
						}
					}
					else if(max==count2)
					{
						  minx=al2.get(0).x;
						   miny=al2.get(0).y;
						System.out.println(al2);
						   for(Point p:al2)
							{
							if(p.x>minx)
								minx=p.x;
							if(p.y<miny)
								miny=p.y;
							}
					}
					else if(max==count3)
					{
						  minx=al3.get(0).x;
						   miny=al3.get(0).y;
System.out.println(al3);
							for(Point p:al3)
							{
							if(p.x>minx)
								minx=p.x;
							if(p.y>miny)
								miny=p.y;
							}
					}
					else
					{
						 minx=al4.get(0).x;
						   miny=al4.get(0).y;
							System.out.println(al4);
						   for(Point p:al4)
							{
							if(p.x<minx)
								minx=p.x;
							if(p.y>miny)
								miny=p.y;
							}
					}
					System.out.println(max);
					System.out.println(minx+" "+miny);
					
				}
				
				
				
				catch(Exception e)
				{
					
				}
	 }

	
}
class Point
{
	int x;
	int y;
	Point(int x,int y)
	{
		this.x=x;
		this.y=y;
	}
	public String toString()
	{
		return String.format("%d %d", x,y);
	}
}
