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.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
 
public class B {	
	public static void main(String[] args) throws IOException {
		try {
		BufferInput in = new BufferInput();
		int n = in.nextInt();
		int a = in.nextInt();
		int b = in.nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		for(int i=0;i<n;i++) {
			x[i] = in.nextInt();
			y[i] = in.nextInt();
		}
		int up = 0;
		int left = 0;
		int right=0;
		int down=0;
		for(int i=0;i<n;i++) {
			if(x[i]>a) right++;
		}
		for(int i=0;i<n;i++) {
			if(y[i]>b) up++;
		}
		for(int i=0;i<n;i++) {
			if(x[i]<a) left++;
		}
		for(int i=0;i<n;i++) {
			if(y[i]<b) down++;
		}
		if(left>=right&&left>=Math.max(up, down)) {
			System.out.println(left);
			System.out.println((a-1)+" "+b);
		}
		else if(left<right&&right>=Math.max(up, down)) {
			System.out.println(right);
			System.out.println((a+1)+" "+b);
		}
		else if(up>=down&&up>=Math.max(left, down)) {
			System.out.println(up);
			System.out.println(a+" "+(b+1));
		}
		else {
			System.out.println(down);
			System.out.println(a+" "+(b-1));
		}
		}catch(Exception e) {}
	}
	static void revOrder(int[] arr) {
		for(int i=0;i<arr.length;i++) {
			int t = arr[0];
			arr[0] = arr[arr.length-i-1];
			arr[arr.length-i-1] = t;
		}
	}
static class BufferInput {
		final private int BUFFER_SIZE = 1 << 16;
		
		private DataInputStream din;
		
		private byte[] buffer;
		
		private int bufferPointer, bytesRead;
		
		public BufferInput() {
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}
 
		public BufferInput(String file_name) throws IOException {
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}
 
		/**
		 * Reads the input bytes until it encounters a new line char.
		 * @return
		 * @throws IOException
		 */
		public String readLine() throws IOException {
			byte[] buf = new byte[64];
			int cnt = 0, c;
			while ((c = read()) != -1) {
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}
		
		/**
		 * 
		 * @return
		 * @throws IOException
		 */
		public String nextString() throws IOException{
			
			// Skip all whitespace characters from the stream
			byte c = read();
			while(Character.isWhitespace(c)){
				c = read();
			}
			
			StringBuilder builder = new StringBuilder();
			builder.append((char)c);
			c = read();
			while(!Character.isWhitespace(c)){
				builder.append((char)c);
				c = read();
			}
			
			return builder.toString();
		}
			
		/**
		 * Reads an integer value.
		 * @return
		 * @throws IOException
		 */
		public int nextInt() throws IOException {
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
 
			if (neg)
				return -ret;
			return ret;
		}
		
 
		/**
		 * Reads an array of integers.
		 * @return
		 * @throws IOException
		 */
		public int[] nextIntArray(int n) throws IOException {
			int arr[] = new int[n];
			for(int i = 0; i < n; i++){
				arr[i] = nextInt();
			}
			return arr;
		}
 
 
		/**
		 * Reads a long value.
		 * @return
		 * @throws IOException
		 */
		public long nextLong() throws IOException {
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}
		
		
		/**
		 * Reads an array of long integers.
		 * @return
		 * @throws IOException
		 */
		public long[] nextLongArray(int n) throws IOException {
			long arr[] = new long[n];
			for(int i = 0; i < n; i++){
				arr[i] = nextLong();
			}
			return arr;
		}
		
		/**
		 * 
		 * @return
		 * @throws IOException
		 */
		public char nextChar() throws IOException{
			byte c = read();
			while(Character.isWhitespace(c)){
				c = read();
			}
			return (char) c;	
		}
		
 
		/**
		 * Reads a double value.
		 * @return
		 * @throws IOException
		 */
		public double nextDouble() throws IOException {
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
 
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
 
			if (c == '.') {
				while ((c = read()) >= '0' && c <= '9') {
					ret += (c - '0') / (div *= 10);
				}
			}
 
			if (neg)
				return -ret;
			return ret;
		}
 
		/**
		 * Reads an array of double values.
		 * @return
		 * @throws IOException
		 */
		public double[] nextDoubleArray(int n) throws IOException {
			double arr[] = new double[n];
			for(int i = 0; i < n; i++){
				arr[i] = nextDouble();
			}
			return arr;
		}
		
		/**
		 * Fills the buffer from input stream.
		 * 
		 * @throws IOException
		 */
		private void fillBuffer() throws IOException {
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}
 
		/**
		 * 
		 * @return
		 * @throws IOException
		 */
		private byte read() throws IOException {
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}
 
		public void close() throws IOException {
			if (din == null)
				return;
			din.close();
		}
	}
 
}
 