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.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.util.Scanner;
import java.util.StringTokenizer;
 
public class temp {
	
	void solve() throws IOException {
		FastReader sc = new FastReader();
		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<n;i++)
		{
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
		}
		
		int c = 0 , max = -1 , ax = 0 , ay = 0;
		boolean f = false;
		for(int i=0;i<n;i++)
		{
			if((x[i]<=(sx-1) && y[i]>=sy) || (x[i]<=(sx-1) && y[i]<=sy))
				c++;
		}
		
		if(c > max)
		{
			max = c;
			ax = sx-1;
			ay = sy;
		}
		
		c = 0;
		for(int i=0;i<n;i++)
		{
			if( (x[i]<=sx && y[i]>=(sy+1)) || (x[i]>=sx && y[i]>=(sy+1)) ) 
				c++;
		}
		
		if(c > max)
		{
			max = c;
			ax = sx;
			ay = sy+1;
		}
		c = 0;
		for(int i=0;i<n;i++)
		{
			if((x[i]>=(sx+1) && y[i]>=sy) || (x[i]>=(sx+1) && y[i]<=sy))
				c++;
		}
		
		if(c > max)
		{
			max = c;
			ax = sx+1;
			ay = sy;
		}
		c = 0;
		for(int i=0;i<n;i++)
		{
			if((x[i]<=sx && y[i]<=(sy-1)) || (x[i]>=sx && y[i]<=(sy-1)))
				c++;
		}
		
		if(c > max)
		{
			max = c;
			ax = sx;
			ay = sy-1;
		}
		System.out.println(max);
		System.out.println(ax+" "+ay);
	}
	 
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		new temp().solve();
	}
	
	class FastReader {
		BufferedReader br;
		StringTokenizer st;
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
}