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.*;
import java.io.*;
import java.lang.*;

public class cfs {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int sx = sc.nextInt();
		int sy = sc.nextInt();
		int arr[] = new int[5];
		arr[0] = -1;
		int arr2[] = new int[5];
		arr2[0] = -1;

		int arx[] = new int[n + 1];
		int ary[] = new int[n + 1];
		TreeSet<Integer> ff = new TreeSet<>();
		TreeSet<Integer> ss = new TreeSet<>();

		TreeSet<Integer> tt = new TreeSet<>();
		TreeSet<Integer> frt = new TreeSet<>();
 
		for (int i = 1; i <= n; i++) {
			int x = sc.nextInt();
			int y = sc.nextInt();
			arx[i] = x;
			ary[i] = y;
			if (x > sx && y > sy)
				arr[1]++;
			if (x > sx && y == sy) {
				arr2[1]++;
				ff.add(x);
			}
			if (x < sx && y == sy) {
				arr2[3]++;
				tt.add(x);
			}
			if (y > sy && x == sx) {
				arr2[2]++;
				ss.add(y);
			}
			if (y < sy && x == sx) {
				arr2[4]++;
				frt.add(y);
			}
			if (x > sx && y < sy)
				arr[4]++;
			if (x < sx && y < sy)
				arr[3]++;
			if (x < sx && y > sy)
				arr[2]++;
		}
		int m = Integer.MIN_VALUE;
		int mi = -1;
		for (int i = 1; i <= 4; i++) {
			if (arr[i] > m) {
				m = arr[i];
				mi = i;
			}
		}
		arr[0] = arr[4];
		arr2[0] = arr2[4];
		int q1 = (mi - 1) % 4;
		int q2 = (mi + 1) % 4;
		int a1 = mi % 4;

		int a2 = (mi + 1) % 4;
		TreeSet<Integer> ar[] = new TreeSet[4];
		ar[0] = frt;
		ar[1] = ff;
		ar[2] = ss;
		ar[3] = tt;
		int A1 = arr[q1] + arr2[a1];
		int A2 = arr[q2] + arr2[a2];
		
		if (A1 >= A2) {
			System.out.println(A1 + arr[mi]);
			int min = Integer.MAX_VALUE;
		      
			if (a1 == 0) {
				System.out.println(sx+" "+(sy-1));
				
			}
			if (a1 == 1) {
           
				System.out.println((sx+1)+" "+sy);
			}
			if (a1 == 2) {
				System.out.println(sx+" "+(sy+1));
			}
			if (a1 == 3) {
               System.out.println((sx-1)+" "+sy);
			}

		} else {
			System.out.println(A2 + arr[mi]);
			int min = Integer.MAX_VALUE;
			if (a1 == 0) {
				System.out.println(sx+" "+(sy-1));
				
			}
			if (a1 == 1) {
           
				System.out.println((sx+1)+" "+sy);
			}
			if (a1 == 2) {
				System.out.println(sx+" "+(sy+1));
			}
			if (a1 == 3) {
               System.out.println((sx-1)+" "+sy);
			}		}

	}

}
