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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.StringTokenizer;

public class ShawarmaTent { // Template for CF
    public static class ListComparator implements Comparator<List<Integer>> {

        @Override
        public int compare(List<Integer> l1, List<Integer> l2) {
            for (int i = 0; i < l1.size(); ++i) {
                if (l1.get(i).compareTo(l2.get(i)) != 0) {
                    return l1.get(i).compareTo(l2.get(i));
                }
            }
            return 0;
        }
    }

    public static void main(String[] args) throws IOException {
        // Check for int overflow!!!!
        // Should you use a long to store the sum or smthn?
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(f.readLine());
        int N = Integer.parseInt(st.nextToken());
        int x = Integer.parseInt(st.nextToken());
        int y = Integer.parseInt(st.nextToken());
        int a = 0;
        int b = 0;
        int c = 0;
        int d = 0;
        int ab = 0;
        int bd = 0;
        int cd = 0;
        int ac = 0;
        for (int i = 0; i < N; i++) {
            StringTokenizer yz = new StringTokenizer(f.readLine());
            int x1 = Integer.parseInt(yz.nextToken());
            int y1 = Integer.parseInt(yz.nextToken());
            if (x1 == x) {
                if (y1 > y) {
                    ab++;
                } else {
                    cd++;
                }
            } else if (y1 == y) {
                if (x1 > x) {
                    bd++;
                } else {
                    ac++;
                }
            } else if (x1 < x && y1 < y) {
                c++;
            } else if (x1 < x && y1 > y) {
                a++;
            } else if (x1 > x && y1 < y) {
                d++;
            } else {
                b++;
            }
        }
        cd += c + d;
        ac += a + c;
        ab += a + b;
        bd += d + b;
        List<Integer> list = new ArrayList<>();
        list.add(ab);
        list.add(bd);
        list.add(ac);
        list.add(bd);
        Collections.sort(list);
        if (list.get(3) == ab) {
            out.println(ab);
            out.println(x + " " + (y + 1));
        } else if (list.get(3) == ac) {
            out.println(ac);
            out.println((x - 1) + " " + y);
        } else if (list.get(3) == cd) {
            out.println(cd);
            out.println(x + " " + (y - 1));
        } else if (list.get(3) == bd) {
            out.println(bd);
            out.println((x + 1) + " " + y);
        }
        out.close();
    }

}