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.Arrays;
import java.util.Scanner;

public class c {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt(), sx=scan.nextInt(), sy=scan.nextInt();
		int[] dx={-1,-1,-1,0,0,1,1,1};
		int[] dy={-1,0,1,-1,1,-1,0,1};
		
		int[] ct=new int[8];
		
		for(int i=0;i<n;i++) {
			int x=scan.nextInt(), y=scan.nextInt();
			for(int k=0;k<8;k++) {
				int nx=sx+dx[k], ny=sy+dy[k];
				if(inside(x,y,sx,sy,nx,ny)) {
					ct[k]++;
				}
			}
		}
		int id=-1, max=-1;
		for(int i=0;i<8;i++) {
			if(ct[i]>max) {
				id=i;
				max=ct[i];
			}
		}
		System.out.println(max);
		System.out.println((sx+dx[id])+" "+(sy+dy[id]));
	}
	public static boolean inside(int x1, int y1, int x2, int y2, int xx, int yy) {
		boolean betweenx=false, betweeny=false;
		betweenx|=x1<=xx&&xx<=x2;
		betweenx|=x2<=xx&&xx<=x1;
		betweeny|=y1<=yy&&yy<=y2;
		betweeny|=y2<=yy&&yy<=y1;
		
		return betweenx&&betweeny;
	}
}