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;
import java.util.*;
public class ShawarmaTent {
	static 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; 
		} 
	} 


	public static void main(String[] args) {
		FastReader f=new FastReader();
		int n=f.nextInt();
		int sx=f.nextInt();
		int sy=f.nextInt();
		int x[]=new int[n];
		int y[]=new int[n];
		for(int i=0;i<n;i++) {
			x[i]=f.nextInt();
			y[i]=f.nextInt();
		}
		int up=0;
		int down=0;
		int right=0;
		int left=0;
		for(int i=0;i<n;i++) {
			if(x[i]>sx) {
				right++;
			}
			else if(x[i]<sx) {
				left++;
			}
			else if(y[i]<sy) {
				down++;
			}
			else if(y[i]>sy) {
				up++;
			}
			else if(x[i]==sx) {
				if(y[i]<sy) {
					down++;
				}
				else if(y[i]>sy) {
					up++;
				}
			}
			
			else if(y[i]==sy) {
				if(x[i]>sx) {
					right++;
				}
				else if(x[i]<sx) {
					left++;
				}
			}
		}
		
		int max=Math.max(Math.max(up, down),Math.max(left,right));
		boolean u=false;
		boolean d=false;
		boolean l=false;
		boolean r=false;
		
		if(max==up) u=true;
		else if(max==down) d=true;
		else if(max==left) l=true;
		else if(max==right) r=true;
		
		System.out.println(max);
		if(r==true) {
			System.out.println((sx+1)+" "+(sy));
			return;
		}else if(l==true) {
			System.out.println((sx-1)+" "+(sy));
			return;
		}else if(u==true) {
			System.out.println((sx)+" "+(sy+1));
			return;
		}else if(d==true) {
			System.out.println((sx)+" "+(sy-1));
			return;
		}
	}

}
