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.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class Question3 {

    public static void solve(List<Integer[]> coords, int sx, int sy, int n) {
        int best = 0;
        int bestx = -1, besty = -1;
        int cur;
        for (int i=-1; i<=1; i++) {
            for (int j=-1; j<=1; j++){
                if (i == 0 && j == 0) continue;
                cur = 0;
                for(Integer[] coord : coords){
                    if ( intersects(coord, sx, sy, sx + i ,sy + j) ) {
                        ++cur;
                    }
                }
                if (cur > best) {
                    best = cur;
                    bestx = sx + i;
                    besty = sy + j;
                }
            }
        }
        out.println(best);
        out.println(bestx + " " + besty);
    }

    private static boolean intersects(Integer[] coord, int sx, int sy, int cx, int cy) {
        int x_min = Math.min(sx, coord[0]);
        int x_max = Math.max(sx, coord[0]);
        int y_min = Math.min(sy, coord[1]);
        int y_max = Math.max(sy, coord[1]);
        return cx >= x_min && cx <= x_max && cy >= y_min && cy <= y_max;
    }

    public static void main(String[] args){
        MyScanner sc = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

        int n = sc.nextInt(), sx = sc.nextInt(), sy = sc.nextInt();
        List<Integer[]> coords = new ArrayList<>();
        for(int i=0; i<n; i++) {
            Integer[] studentCoord = new Integer[2];
            studentCoord[0] = sc.nextInt();
            studentCoord[1] = sc.nextInt();
            coords.add(studentCoord);
        }

        solve(coords, sx, sy, n);
        out.close();
    }


    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;

    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

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

    }
    //--------------------------------------------------------
}