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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Abhijeetkns
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CShawarmaTent solver = new CShawarmaTent();
        solver.solve(1, in, out);
        out.close();
    }

    static class CShawarmaTent {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int sx = in.nextInt();
            int sy = in.nextInt();
            int arr[][] = new int[n][2];
            for (int i = 0; i < n; ++i) {
                arr[i][0] = in.nextInt();
                arr[i][1] = in.nextInt();
            }
            int[][] s = {
                    {sx - 1, sy},
                    {sx, sy + 1},
                    {sx + 1, sy},
                    {sx, sy - 1}
            };
            int mdist[] = new int[n];
            for (int i = 0; i < n; ++i) {
                mdist[i] = Math.abs(arr[i][0] - sx) + Math.abs(arr[i][1] - sy);
            }
            int res = 0;
            int ans[] = new int[3];
            for (int i = 0; i < 4; ++i) {
                int cur = 0;
                for (int j = 0; j < n; ++j) {
                    int val = Math.abs(arr[j][0] - s[i][0]) + Math.abs(arr[j][1] - s[i][1]) + 1;
                    if (val <= mdist[j]) cur++;
                }
                if (res < cur) {
                    res = cur;
                    ans[0] = res;
                    ans[1] = s[i][0];
                    ans[2] = s[i][1];
                }
            }
            out.println(res);
            out.println(ans[1] + " " + ans[2]);
        }

    }
}

