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

public class C1271 {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		int n = sc.nextInt();
		int sx = sc.nextInt();
		int sy = sc.nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		for (int i = 0; i < y.length; i++) {
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
		}
		int left = 0;
		int right = 0;
		int up = 0;
		int down = 0;
		for (int i = 0; i < y.length; i++) {
			if (x[i] > sx) {
				right++;
			}
			if (x[i] < sx) {
				left++;
			}
			if (y[i] > sx) {
				up++;
			}
			if (y[i] < sx) {
				down++;
			}
		}
		if (sx == 0)
			left = -1;
		if (sx == (int) 1e9)
			right = -1;
		if (sy == 0)
			down = -1;
		if (sy == (int) 1e9)
			up = -1;

		int max = Math.max(Math.max(left, right), Math.max(up, down));
		pw.println(max);
		if (max == left) {
			sx--;
		} else if (max == right) {
			sx++;
		} else if (max == up) {
			sy++;
		} else {
			sy--;
		}
		pw.println(sx + " " + sy);
		pw.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(FileReader r) {
			br = new BufferedReader(r);
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

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

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

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}
}
