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
// 08-Mar-2021
import java.util.*;
import java.io.*;

public class WU {
	static class FastReader {

		BufferedReader br;
		StringTokenizer st;

		private FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		int[] nextIntArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		int[] nextIntArrayOne(int n) {
			int[] a = new int[n + 1];
			for (int i = 1; i < n + 1; i++)
				a[i] = nextInt();
			return a;
		}

		long[] nextLongArray(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		long[] nextLongArrayOne(int n) {
			long[] a = new long[n + 1];
			for (int i = 1; i < n + 1; i++)
				a[i] = nextLong();
			return a;
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	public static void main(String[] args) {
		FastReader s = new FastReader();
		

		int n = s.nextInt();
		int sx = s.nextInt(), sy = s.nextInt();
		
		int x[] = new int[n];
		int y[] = new int[n];
		
		long dp[][] = new long[n][4]; 
		
		for(int i = 0; i < n; i++) {
			x[i] = s.nextInt();
			y[i] = s.nextInt();
		}
		
		long minArr[] = new long[n];
		Arrays.fill(minArr, Long.MAX_VALUE);
		
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < 4; j++) {
				int xx =0, yy = 0;
				
				if(j == 0 ) {
					xx = sx;
					yy = sy - 1;
				}else if(j == 1) {
					xx = sx - 1;
					yy = sy;
				}else if(j == 2) {
					xx = sx;
					yy = sy + 1;
				}else {
					xx = sx + 1;
					yy = sy;
				}
				
				
				if(xx >= 0 && yy >= 0) {
					dp[i][j] = Math.abs(x[i] - xx) + Math.abs(y[i] - yy);
					minArr[i] = Math.min(minArr[i], dp[i][j]);
				}else { 
					dp[i][j] = Long.MAX_VALUE;
				}
				
			}
		}
		
		long max = -1;
		long ansx = -1, ansy = -1;
		for(int i = 0; i < 4; i++) {
			long count = 0;
			for(int j = 0; j < n; j++) {
				if(dp[j][i] == minArr[j]) count++;
			}
			
			if(count >= max) {
				max = count;
				int xx =0, yy = 0;
				
				if(i == 0 ) {
					xx = sx;
					yy = sy - 1;
				}else if(i == 1) {
					xx = sx - 1;
					yy = sy;
				}else if(i == 2) {
					xx = sx;
					yy = sy + 1;
				}else {
					xx = sx + 1;
					yy = sy;
				}
				
				ansx = xx;
				ansy = yy;
			}
		}
		
		
		
		
		
		System.out.println(max +"\n" + ansx + " " + ansy);
	}

}
