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.util.*;
import java.awt.Point;
import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        Reader scan = new Reader();
        scan.init(System.in);
        OutputStream output = System.out;
        PrintWriter out = new PrintWriter(output);
        int N = scan.nextInt();
        int sx = scan.nextInt(),sy = scan.nextInt();
        Point[] p = new Point[N];
        for (int i=0;i<N;i++){
            int X = scan.nextInt();
            int Y = scan.nextInt();
            p[i] = new Point(X,Y);
        }
        int left = 0;
        int right = 0;
        int up = 0;
        int down = 0;
        for (Point i : p){
            if (i.x>sx){
                right++;
            }
            else if (i.x<sx){
                left++;
            }
            if (i.y>sy){
                up++;
            }
            else if (i.y<sy){
                down++;
            }
        }
        int max = Math.max(Math.max(left,right),Math.max(up,down));
        System.out.println(max);
        if (max==left){
            System.out.println((sx-1)+" "+sy);
        }
        else if (max==right){
            System.out.println((sx+1)+" "+sy);
        }
        else if (max==up){
            System.out.println(sx+" "+(sy+1));
        }
        else if (max==down){
            System.out.println(sx+" "+(sy-1));
        }
        out.close();
    }
}
class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }
    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }
    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}