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

    static point a[];

    static int check(int wx, int wy, int sx, int sy) { //waurma
        int cnt = 0;
        for (int i = 0; i < a.length; i++) {
            int x = a[i].x;
            int y = a[i].y;
            if (wx >= Math.min(sx, x) && wy >= Math.min(sy, y) && wx <= Math.max(sx, x) && wy <= Math.max(sy, y)) cnt++;
        }
        return cnt;
    }


    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        int n = nextInt();
        int sx = nextInt();
        int sy = nextInt();
        a = new point[n];
        for (int i = 0; i < n; i++) {
            a[i] = new point(nextInt(), nextInt());
        }
        cf b = new cf(check(sx - 1, sy, sx, sy), sx - 1, sy);
        cf c = new cf(check(sx + 1, sy, sx, sy), sx + 1, sy);
        cf d = new cf(check(sx, sy - 1, sx, sy), sx, sy - 1);
        cf e = new cf(check(sx, sy + 1, sx, sy), sx, sy + 1);
        TreeSet<cf> ts = new TreeSet<>((o1, o2) -> Integer.compare(o1.value, o2.value));
        ts.add(b);
        ts.add(c);
        ts.add(d);
        ts.add(e);
        out.println(ts.last().value);
        out.println(ts.last().x + " " + ts.last().y);
        out.close();
    }

    static BufferedReader br;
    static StringTokenizer st = new StringTokenizer("");

    static String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

}

class point {
    int x, y;

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

class cf {
    int value, x, y;

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