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 codeforces;

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

public class Tents {
	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 sc=new FastReader();
		int n=sc.nextInt();
		int x=sc.nextInt();
		int y=sc.nextInt();
		int first=0;
		int second=0;
		int third=0;
		int fourth=0;
		int up=0;
		int down=0;
		int left=0;
		int right=0;
		int c=x;
		int d=y;
		int max=0;
		for(int i=1;i<=n;i++) {
			int a=sc.nextInt();
			int b=sc.nextInt();
			if(a>x && b>y)
				first++;
			else if(a<x && b>y)
				second++;
			else if(a<x && b<y)
				third++;
			else if(a>x && b<y)
				fourth++;
			else if(y==b){
				if(x<a) 
					left++;
				else 
					right++;
			}
			else if(x==a){
				if(b>y) 
					up++;
				else 
					down++;
			}
		}
	up=up+first+second;
	down=down+third+fourth;
	left=left+second+third;
	right=right+first+fourth;
	if(max<Math.max(max,left)) {
		c=x;
		d=y;
		c--;
		max=Math.max(max,left);
		}
	if(max<Math.max(max,right)) {
		c=x;
		d=y;
		x++;
		max=Math.max(max,right);
		}
	if(max<Math.max(max,up)) {
		c=x;
		d=y;
		d++;
		max=Math.max(max,up);}
	if(max<Math.max(max,down)) {
		c=x;
		d=y;
		d--;
		max=Math.max(max,down);
		}
	System.out.println(max);
	System.out.println(c+" "+d);
	}
	
}
