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
//package Round608;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;

public class typeC {
	static class Point{
		int x;
		int y;
	}
	public static void main(String[] args) {
		FastReader s = new FastReader();
		int n = s.nextInt();
		Point sc = new Point();
		sc.x = s.nextInt();
		sc.y = s.nextInt();
		Point D = new Point();
		D.x = sc.x;
		D.y = sc.y-1;
		Point U = new Point();
		U.x = sc.x;
		U.y = sc.y+1;
		Point L = new Point();
		L.x = sc.x-1;
		L.y = sc.y;
		Point R = new Point();
		R.x = sc.x+1;
		R.y = sc.y;
		int cntD = 0;
		int cntU = 0;
		int cntR = 0;
		int cntL = 0;
		Point[] stu = new Point[n];
		for(int i=0;i<n;i++) {
			stu[i]= new Point();
			stu[i].x = s.nextInt();
			stu[i].y = s.nextInt();
			if(stu[i].x>=R.x) {
				cntR++;
			}
			if(stu[i].x<=L.x) {
				cntL++;
			}
			if(stu[i].y>=U.y) {
				cntU++;
			}
			if(stu[i].x<=D.x) {
				cntD++;
			}
			
		}
		int max = Math.max(cntU,Math.max(cntD,Math.max(cntR,cntL)));
		System.out.println(max);
		if(cntU>=cntL && cntU>=cntD && cntU>=cntR) {
			System.out.println(U.x+" "+U.y);
		}
		else if(cntD>=cntL && cntD>=cntU && cntD>=cntR) {
			System.out.println(D.x+" "+D.y);
		}
		else if(cntL>=cntU && cntL>=cntD && cntL>=cntR) {
			System.out.println(L.x+" "+L.y);
		}
		else if(cntR>=cntL && cntR>=cntD && cntR>=cntU) {
			System.out.println(R.x+" "+R.y);
		}
		
		
	}
	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; 
	    } 
	} 

}
