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

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int x=in.nextInt();
		int y=in.nextInt();
		int a=0,d=0,w=0,s=0,q=1;
		for(int i=0;i<n;i++)
		{
			int x0=in.nextInt();
			int y0=in.nextInt();
			if(x0<x)a++;
			if(x0>x)d++;
			if(y0>y)w++;
			if(y0<y)s++;
		}
		int max=a;
		if(d>max)
		{
			max=d;
			q=2;
		}
		if(w>max)
		{
			max=w;
			q=3;
		}
		if(s>max)
		{
			max=s;
			q=4;
		}
		System.out.println(max);
		if(q==1)System.out.println(x-1+" "+y);
		if(q==2)System.out.println(x+1+" "+y);
		if(q==3)System.out.println(x+" "+(y+1));
		if(q==4)System.out.println(x+" "+(y-1));
	}

}