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.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import javafx.util.Pair;

public class CodeChef {

	static boolean flag = false;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
String[] sr=br.readLine().split(" ");

	int n=Integer.parseInt(sr[0]);
	int x=Integer.parseInt(sr[1]);
	int y=Integer.parseInt(sr[2]);
	
	
ArrayList<Pair<Integer,Integer>> list=new ArrayList<>();
int ult=0;
for(int i=0;i<n;i++)
{ sr=br.readLine().split(" ");

int a=Integer.parseInt(sr[0]);
int b=Integer.parseInt(sr[1]);
list.add(new Pair(a,b));
	}
int ind1=0,ind2=0;
int max=Integer.MIN_VALUE;
int count=0;
if(x-1>=0)
{
	for(int i=0;i<n;i++)
{int a=list.get(i).getKey();
int b=list.get(i).getValue();
int dist=Math.abs(a-x)+Math.abs(b-y);
int dist2=Math.abs(a+1-x)+Math.abs(b-y);
if(dist2+1<=dist)
	count++;
	}
	if(count>max)
	{
		max=count; ind1=x-1;ind2=y;
	}
	}
if(y-1>=0)
{
	count=0;
	for(int i=0;i<n;i++)
	{int a=list.get(i).getKey();
	int b=list.get(i).getValue();
	int dist=Math.abs(a-x)+Math.abs(b-y);
	int dist2=Math.abs(a-x)+Math.abs(b-y+1);
	if(dist2+1<=dist)
		count++;

		}
		if(count>max)
		{
			max=count; ind1=x;ind2=y-1;
		}
}
	

count=0;
	for(int i=0;i<n;i++)
	{int a=list.get(i).getKey();
	int b=list.get(i).getValue();
	int dist=Math.abs(a-x)+Math.abs(b-y);
	int dist2=Math.abs(a-x-1)+Math.abs(b-y);
	if(dist2+1<=dist)
		count++;

		}
		if(count>max)
		{
			max=count; ind1=x+1;ind2=y;
		

}

		count=0;
		for(int i=0;i<n;i++)
		{int a=list.get(i).getKey();
		int b=list.get(i).getValue();
		int dist=Math.abs(a-x)+Math.abs(b-y);
		int dist2=Math.abs(a-x)+Math.abs(b-y-1);
		if(dist2+1<=dist)
			count++;

			}
			if(count>max)
			{
				max=count; ind1=x;ind2=y-1;
			}
		
System.out.println(max);
System.out.println(ind1+" "+ind2);
	

}}