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.util.*;
 
public class Main {
	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; } 
    }
	static FastReader sc = new FastReader();
	static long mod = (long)(1e9+7);
	public static void main (String[] args){
        PrintWriter out = new PrintWriter(System.out);
        int t = 1;
//        t = sc.nextInt();
        z :while(t-->0){
        	int n = sc.nextInt();
        	int sx = sc.nextInt();
        	int sy = sc.nextInt();
        	int a[][] = new int[n][2];
        	for(int i=0;i<n;i++) {
        		a[i][0] = sc.nextInt();
        		a[i][1] = sc.nextInt();
        	}
        	int ans = 0, ax=-1,ay=-1;
        	for(int i=-1;i<2;i++) {
        		for(int j=-1;j<2;j++) {
        			if((i==0&&j!=0) || (i!=0&&j==0)) {
        				int x = sx+i, y = sy+j;
        				int cnt = 0;
        				for(int k=0;k<n;k++) {
        					int minx = Math.min(sx, a[k][0]);
        					int maxx = Math.max(sx, a[k][0]);
        					int miny = Math.min(sy, a[k][1]);
        					int maxy = Math.max(sy, a[k][1]);
        					if((minx<=x&&x<=maxx) && (miny<=y&&y<=maxy)) {
        						cnt++;
        					}
        				}
        				if(ans<cnt) {
        					ans = cnt;
        					ax = x; ay = y;
        				}
        			}
        		}
        	}
        	out.write(ans+"\n");
        	out.write(ax+" "+ay+"\n");
       	}
		out.close();
	}
}
