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

public class practice2 {

	public static void main(String[] args) {
		Scanner scn =new Scanner(System.in);
		int n=scn.nextInt();
		int sx=0,sy=0;
		sx=scn.nextInt();
		sy=scn.nextInt();
		int[]arrx=new int[n];
		int[]arry=new int[n];
		for(int i=0;i<n;i++) {
			arrx[i]=scn.nextInt();
			arry[i]=scn.nextInt();
		}
		int fx=0,fy=0,fcount=0;
		if(sx<1000000000) {
			int x=sx+1;
			int y=sy;
			int count=0;
			for(int i=0;i<n;i++) {
				if(arrx[i]>=x)
					count++;
			}
			if(fcount<count) {
				fcount=count;
				fx=x;
				fy=y;
			}
		}
		if(sx>0) {
			int x=sx-1;
			int y=sy;
			int count=0;
			for(int i=0;i<n;i++) {
				if(arrx[i]<=x)
					count++;
			}
			if(fcount<count) {
				fcount=count;
				fx=x;
				fy=y;
			}
		}
		if(sy<1000000000) {
			int x=sx;
			int y=sy+1;
			int count=0;
			for(int i=0;i<n;i++) {
				if(arry[i]>=y)
					count++;
			}
			if(fcount<count) {
				fcount=count;
				fx=x;
				fy=y;
			}
		}
		if(sy>0) {
			int x=sx;
			int y=sy-1;
			int count=0;
			for(int i=0;i<n;i++) {
				if(arry[i]<=y)
					count++;
			}
			if(fcount<count) {
				fcount=count;
				fx=x;
				fy=y;
			}
		}
		System.out.println(fcount);
		System.out.println(fx+" "+fy);
	}

}
