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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Problem1271C {

	public static void main(String[] args) {
		Problem1271C instance = new Problem1271C();
		BufferedReader bfr = null;

		try {
			bfr = new BufferedReader(new InputStreamReader(System.in));
			String line = "";
			int n = 0;
			int sx = 0;
			int sy = 0;

			if ((line = bfr.readLine()) != null) {
				String[] tokens = line.split(" ");
				n = Integer.parseInt(tokens[0]);
				sx = Integer.parseInt(tokens[1]);
				sy = Integer.parseInt(tokens[2]);
			}
			int count = 0;
			int[] x = new int[n];
			int[] y = new int[n];

			while ((line = bfr.readLine()) != null) {
				String[] tokens = line.split(" ");
				x[count] = Integer.parseInt(tokens[0]);
				y[count] = Integer.parseInt(tokens[1]);
				count++;
				if (count == n)
					break;
			}
			instance.process(n, sx, sy, x, y);

		} catch (Throwable t) {
			System.err.println(t);
		} finally {
			if (bfr != null) {
				try {
					bfr.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}

	}

	private void process(int n, int sx, int sy, int[] x, int[] y) {

		int xm = 0;
		int ym = 0;
		int p1 = 0;
		int p2 = 0;
		int p3 = 0;
		int p4 = 0;

		for (int i = 0; i < n; i++) {
			xm = x[i] - sx;
			ym = y[i] - sy;
			if (xm > 0 && ym > 0) {
				// q1
				p1++;
				p4++;
			} else if (xm < 0 && ym > 0) {
				// q2
				p1++;
				p2++;
			} else if (xm < 0 && ym < 0) {
				p2++;
				p3++;
				// q3
			} else if (xm > 0 && ym < 0) {
				// q4
				p3++;
				p4++;
			} else if (xm == 0 && ym > 0) {
				p1++;
			} else if (xm < 0 && ym == 0) {
				p2++;
			} else if (xm == 0 && ym < 0) {
				p3++;
			} else if (xm > 0 && ym == 0) {
				p4++;
			}

		}

		int index = 1;
		int max = p1;
		if (p2 > max) {
			max = p2;
			index = 2;
		}
		if (p3 > max) {
			max = p3;
			index = 3;
		}
		if (p4 > max) {
			max = p4;
			index = 4;
		}

		System.out.println(max);
		if (index == 1) {
			System.out.println((sx + 0) + " " + (sy + 1));
		} else if (index == 2) {
			System.out.println((sx - 1) + " " + (sy + 0));
		} else if (index == 3) {
			System.out.println((sx + 0) + " " + (sy - 1));
		} else if (index == 4) {
			System.out.println((sx + 1) + " " + (sy + 0));
		}
	}

}
