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.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Q3 {
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		MScanner s = new MScanner(System.in);
		int n = s.nextInt();
		int i = s.nextInt();
		int j = s.nextInt();

		int[][] cordinates = new int[n][2];
		int[] dir = new int[4];
		for (int k = 0; k < n; k++) {
			cordinates[k][0] = s.nextInt();
			cordinates[k][1] = s.nextInt();
			if (cordinates[k][0] < i) {
				dir[0]++;
			}
			if (cordinates[k][0] > i) {
				dir[1]++;
			}
			if (cordinates[k][1] > j) {
				dir[2]++;
			}
			if (cordinates[k][1] < j) {
				dir[3]++;
			}
		}
		int tent_x = 0;
		int tent_y = 0;
		int ans = 0;
		if (i - 1 >= 0 && j >= 0) {
			if (ans < dir[0]) {
				ans = dir[0];
				tent_x = i - 1;
				tent_y = j;
			}
		}
		if (i + 1 >= 0 && j >= 0) {
			if (ans < dir[1]) {
				ans = dir[1];
				tent_x = i + 1;
				tent_y = j;
			}
		}
		if (i >= 0 && j + 1 >= 0) {
			if (ans < dir[2]) {
				ans = dir[2];
				tent_x = i;
				tent_y = j + 1;
			}
		}
		if (i >= 0 && j - 1 >= 0) {
			if (ans < dir[3]) {
				ans = dir[3];
				tent_x = i;
				tent_y = j - 1;
			}
		}
		System.out.println(ans);
		System.out.println(tent_x + " " + tent_y);

	}

	static class MScanner {
		StringTokenizer st;
		BufferedReader br;

		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

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

		public int[] intArr(int n) throws IOException {
			int[] in = new int[n];
			for (int i = 0; i < n; i++)
				in[i] = nextInt();
			return in;
		}

		public long[] longArr(int n) throws IOException {
			long[] in = new long[n];
			for (int i = 0; i < n; i++)
				in[i] = nextLong();
			return in;
		}

		public int[] intSortedArr(int n) throws IOException {
			int[] in = new int[n];
			for (int i = 0; i < n; i++)
				in[i] = nextInt();
			shuffle(in);
			Arrays.sort(in);
			return in;
		}

		public long[] longSortedArr(int n) throws IOException {
			long[] in = new long[n];
			for (int i = 0; i < n; i++)
				in[i] = nextLong();
			shuffle(in);
			Arrays.sort(in);
			return in;
		}

		public Integer[] IntegerArr(int n) throws IOException {
			Integer[] in = new Integer[n];
			for (int i = 0; i < n; i++)
				in[i] = nextInt();
			return in;
		}

		public Long[] LongArr(int n) throws IOException {
			Long[] in = new Long[n];
			for (int i = 0; i < n; i++)
				in[i] = nextLong();
			return in;
		}

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

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

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

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

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

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

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}

	static void shuffle(int[] in) {
		for (int i = 0; i < in.length; i++) {
			int idx = (int) (Math.random() * in.length);
			int tmp = in[i];
			in[i] = in[idx];
			in[idx] = tmp;
		}
	}

	static void shuffle(long[] in) {
		for (int i = 0; i < in.length; i++) {
			int idx = (int) (Math.random() * in.length);
			long tmp = in[i];
			in[i] = in[idx];
			in[idx] = tmp;
		}
	}

}