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 {
	public static void main(String[] args) throws IOException 
	{ 
		FastScanner f = new FastScanner(); 
		int ttt=1;
//		ttt=f.nextInt();
		PrintWriter out=new PrintWriter(System.out);
		for(int tt=0;tt<ttt;tt++) {
			int n=f.nextInt();
			int x=f.nextInt();
			int y=f.nextInt();
			int[] count=new int[4];
			for(int k=0;k<n;k++) {
				int i=f.nextInt();
				int j=f.nextInt();
				if(i<x) {
					count[0]++;
				}
				if(i>x) {
					count[1]++;
				}
				if(j<y) {
					count[2]++;
				}
				if(j>y) {
					count[3]++;
				}
			}
			int mx=-1;
			for(int i=0;i<4;i++) mx=Math.max(mx, count[i]);
			if(count[0]==mx) {
				System.out.println(count[0]);
				System.out.println((x-1)+" "+y);
			}
			else if(count[1]==mx) {
				System.out.println(count[1]);
				System.out.println((x+1)+" "+y);
			}
			else if(count[2]==mx) {
				System.out.println(count[2]);
				System.out.println(x+" "+(y-1));
			}
			else  {
				System.out.println(count[3]);
				System.out.println(x+" "+(y+1));
			}
		}
		out.close();
	} 
	static void sort(int[] p) {
        ArrayList<Integer> q = new ArrayList<>();
        for (int i: p) q.add( i);
        Collections.sort(q);
        for (int i = 0; i < p.length; i++) p[i] = q.get(i);
    }
    
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
		long[] readLongArray(int n) {
			long[] a=new long[n];
			for (int i=0; i<n; i++) a[i]=nextLong();
			return a;
		}
	}
} 	