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.math.BigInteger;
import java.util.*;

public class Contest {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Contest().run();
    }

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time(ms) = " + (t2 - t1));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    class MyComparator implements Comparable<MyComparator> {

        int x;
        int y;

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

        @Override
        public int compareTo(MyComparator a) {
            if (x == a.x) {
                return (y - a.y);
            }
            return x - a.x;
        }
    }

    public static boolean isPrime(int num) {
        if (num > 2 && num % 2 == 0) {
            //System.out.println(num + " is not prime");
            return false;
        }
        int top = (int) Math.sqrt(num) + 1;
        for (int i = 3; i < top; i += 2) {
            if (num % i == 0) {
                //System.out.println(num + " is not prime");
                return false;
            }
        }
        //System.out.println(num + " is prime");
        return true;
    }

    private static long gcd(long a, long b) {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
        return gcd.longValue();
    }

    public void solveD() throws IOException {

    }

    public void solve() throws IOException {
        int n = readInt();
        int sx = readInt();
        int sy = readInt();
        int[][] array = new int[n][2];
        for(int i=0; i<n; i++) {
            array[i][0] = readInt(); 
            array[i][1] = readInt(); 
        }
        
        int left = 0;
        int right = 0;
        int up = 0;
        int down = 0;
        for(int i=0; i<n; i++) {
            if(array[i][0] < sx) {
                left ++;
            }
            else if(array[i][0] > sx) {
                right++;
            }
            if(array[i][1] < sy) {
                down++;
            } else if(array[i][1] > sy) {
                up++;
            }
        }
        int max = Math.max(Math.max(Math.max(left, right), up),down);
        
        if(left == max) {
            System.out.println(left);
            System.out.println(sx-1 + " " + sy);
        } else if(right == max) {
            System.out.println(right);
            System.out.println(sx+1 + " " + sy);
        } else if(up == max) {
            System.out.println(up);
            System.out.println(sx + " " + sy+1);
        } else if(right == max) {
            System.out.println(down);
            System.out.println(sx + " " + (sy-1));
        }
    }

    public void solveB() throws IOException {
        int n = readInt();
        String str = readString();
        String[] split = str.split("");
        List<Integer> ops = new ArrayList<>();
        for (int i = 0; i < split.length - 1; i++) {
            if (split[i].equals("B") && split[i + 1].equals("W")) {
                split[i] = "W";
                split[i + 1] = "B";
                ops.add(i + 1);
            } else if (split[i].equals("B") && split[i + 1].equals("B")) {
                split[i] = "W";
                split[i + 1] = "W";
                ops.add(i + 1);
            }
        }
        int w = 0;
        int b = 0;
        for (int i = 0; i < split.length; i++) {
            if (split[i].equals("W")) {
                w++;
            } else {
                b++;
            }
        }
        if (w % 2 == 0) {
            for (int i = 0; i < split.length - 1; i++) {
                if (split[i].equals("W") && split[i + 1].equals("W")) {
                    split[i] = "B";
                    split[i + 1] = "B";
                    ops.add(i + 1);
                }
            }
        } else if (b % 2 == 0) {
            for (int i = 0; i < split.length - 1; i++) {
                if (split[i].equals("B") && split[i + 1].equals("B")) {
                    split[i] = "W";
                    split[i + 1] = "W";
                    ops.add(i + 1);
                }
            }
        } else {
            System.out.println("-1");
            return;
        }
        //System.out.println(split.length);
        StringBuilder builder = new StringBuilder();
        builder.append(ops.size()).append("\n");
        for (int i = 0; i < ops.size(); i++) {
            builder.append(ops.get(i)).append(" ");
        }
        builder.setLength(builder.length() - 1);
        System.out.println(builder);

        //System.out.print(Arrays.asList(split));
    }

    public void solveA() throws IOException {
        int a = readInt();
        int b = readInt();
        int c = readInt();
        int d = readInt();
        int e = readInt();
        int f = readInt();

        int result = 0;
        if (e >= f) {
            int first = Math.min(a, d);
            result += e * first;
            d -= first;
            int second = Math.min(Math.min(b, c), d);
            result += f * second;
        } else {
            int second = Math.min(Math.min(b, c), d);
            result += f * second;
            d -= second;
            int first = Math.min(a, d);
            result += e * first;
        }
        System.out.println(result);
    }

}
