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.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Main1 {




    public static void main(String[] args) {

        try {


            FastScanner in = new FastScanner();
            PrintWriter out = new PrintWriter(System.out);


            int n = in.nextInt() ;
            int x = in.nextInt() ;
            int y = in.nextInt() ;

            long A[] = new long[4] ;

            while (n-- > 0){
                int x1 = in.nextInt() ;
                int y1 = in.nextInt() ;
                if (x1 == x){
                    if (y1 > y)
                        A[0]++ ;
                    else A[2]++ ;
                    continue;
                }
                if (y1 == y){
                    if (x1 > x)
                        A[3]++ ;
                    else A[1]++ ;
                 continue;
                }
                if (x1 > x && y1>y){
                    A[0]++ ; A[3]++ ;
                }
                else if (x1 < x && y1 > y){
                    A[0]++ ; A[1]++ ;
                }
                else if (x1 < x && y1 < y){
                    A[1]++ ; A[2]++ ;
                }
                else {
                    A[2]++ ; A[3]++ ;
                }

            }
            long max = -1 ;
            int max_in = 0 ;
            for (int i = 0; i <4 ; i++) {
                if (A[i] > max_in){
                    max = A[i] ;
                    max_in = i ;
                }
            }
            System.out.println(max);
            if (max_in == 3)
                System.out.println( (x+1) + " " + (y));
            else if (max_in == 0)
                System.out.println( (x) + " " + (y+1));
            else if (max_in == 1)
                System.out.println( (x-1) + " " + (y));
            else System.out.println( (x) + " " + (y-1));


    














            out.flush();
            out.close();


        } catch (Exception e) {
            return;
        }


    }



            static int gcd(int a, int b) {
                if (b > a) {
                    int tenp = b;
                    b = a;
                    a = tenp;
                }
                int temp = 0;
                while (b != 0) {
                    a %= b;
                    temp = b;
                    b = a;
                    a = temp;
                }
                return a;
            }

            static long gcd_long(long a, long b) {
                if (b > a) {
                    long tenp = b;
                    b = a;
                    a = tenp;
                }
                long temp = 0;
                while (b != 0) {
                    a %= b;
                    temp = b;
                    b = a;
                    a = temp;
                }
                return a;
            }














    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());
        }
    }


}








