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 CF608C {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        String[] inputs = br.readLine().split(" ");
        int n = Integer.parseInt(inputs[0]);
        Point school = new Point(Integer.parseInt(inputs[1]), Integer.parseInt(inputs[2]));

        Point[] students = new Point[n];
        for (int ii = 0; ii < n; ii++) {
            inputs = br.readLine().split(" ");
            students[ii] = new Point(Integer.parseInt(inputs[0]), Integer.parseInt(inputs[1]));
        }

        Map<Integer, Point> ans = solve(school, students);
        for (int count : ans.keySet()) {
            bw.write(count + "\n");
            Point swar = ans.get(count);
            bw.write(swar.x + " " + swar.y + "\n");
        }
        bw.flush();
    }

    private static Map<Integer, Point> solve(Point school, Point[] students) {
        int countStudent1 = countStudent(school, students, new Point(school.x-1, school.y));
        int countStudent2 = countStudent(school, students, new Point(school.x+1, school.y));
        int countStudent3 = countStudent(school, students, new Point(school.x, school.y-1));
        int countStudent4 = countStudent(school, students, new Point(school.x, school.y+1));

        Map<Integer, Point> res = new HashMap<>();
        if (countStudent1 >= countStudent2 && countStudent1 >= countStudent3 && countStudent1 >= countStudent4) {
            res.put(countStudent1, new Point(school.x-1, school.y));
        } else if (countStudent2 >= countStudent1 && countStudent2 >= countStudent3 && countStudent2 >= countStudent4) {
            res.put(countStudent2, new Point(school.x+1, school.y));
        } else if (countStudent3 >= countStudent2 && countStudent3 >= countStudent1 && countStudent3 >= countStudent4) {
            res.put(countStudent3, new Point(school.x, school.y-1));
        } else if (countStudent4 >= countStudent2 && countStudent4 >= countStudent3 && countStudent4 >= countStudent1) {
            res.put(countStudent4, new Point(school.x, school.y+1));
        }

        return res;
    }

    private static int countStudent(Point school, Point[] students, Point swar) {
        int res = 0;
        for (Point student : students) {
            boolean isInBetweenX = swar.x >= Math.min(school.x, student.x) && swar.x <= Math.max(school.x, student.x);
            boolean isInBetweenY = swar.y >= Math.min(school.y, student.y) && swar.y <= Math.max(school.y, student.y);
            if (isInBetweenX && isInBetweenY) res++;
        }
        return res;
    }

    private static class Point {
        int x;
        int y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }
}

/*

a = 4
b = 5
c = 6
d = 3

e = 1 --> a + d
f = 2 --> b + c + d


*/