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

public class Solution {

	static Scanner scn = new Scanner(System.in);
	static PrintWriter out = new PrintWriter(System.out);
	static StringBuilder sb = new StringBuilder();

	public static void main(String[] HastaLaVistaLa) {
		int t = 1;
		for(int test = 0; test < t; test++) solve();
		out.println(sb);
		out.close();
	}

	public static void solve() {
		// Road To Specialist Day 3
		int n = scn.nextInt();
		int sx = scn.nextInt(), sy = scn.nextInt();
		int[][] s = new int[n][2];
		for(int i = 0; i < n; i++) {
			s[i][0] = scn.nextInt();
			s[i][1] = scn.nextInt();
		}
		int p1 = sx - 1, q1 = sy, p2 = sx + 1, q2 = sy;
		int p3 = sx, q3 = sy - 1, p4 = sx, q4 = sy + 1;
		int a1 = willCross(s, p1, q1, sx, sy, n), a2 = willCross(s, p2, q2, sx, sy, n);
		int a3 = willCross(s, p3, q3, sx, sy, n), a4 = willCross(s, p4, q4, sx, sy, n);
		int[] max = {a1, a2, a3, a4};
		Arrays.sort(max);
		int mm = max[3];
		sb.append(mm + "\n");
		if(a1 == mm) sb.append(p1 + " " + q1);
		else if(a2 == mm) sb.append(p2 + " " + q2);
		else if(a3 == mm) sb.append(p3 + " " + q3);
		else sb.append(p4 + " " + q4);

	}
	public static int willCross(int[][] s, int x, int y, int sx, int sy, int n) {
		if(x < 0 || y < 0) return -1000000007;
		int canPass = 0;
		for(int i = 0; i < n; i++) {
			int a = s[i][0], b = s[i][1];
			int p1 = sx - 1, q1 = sy, p2 = sx + 1, q2 = sy;
			int p3 = sx, q3 = sy - 1, p4 = sx, q4 = sy + 1;
			int dist1 = manHattanDist(p1, p2, a, b), dist2 = manHattanDist(p2, q2, a, b);
			int dist3 = manHattanDist(p3, q3, a, b), dist4 = manHattanDist(p4, q4, a, b);
			int fDist = manHattanDist(x, y, a, b);
			int[] min = {dist1, dist2, dist3, dist4};
			Arrays.sort(min);
			int mini = min[0];
			if(mini == fDist) canPass++;
		}
		return canPass;
	}
	public static int manHattanDist(int x1, int y1, int x2, int y2) {
		return Math.abs(x1 - x2) + Math.abs(y1 - y2);
	}
}