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 javax.management.DynamicMBean;
import javax.print.DocFlavor;
import javax.print.attribute.HashAttributeSet;
import java.awt.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.attribute.FileAttribute;
import java.util.List;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
import java.util.Arrays;
import java.util.concurrent.Callable;



public class Main {


    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args) {
        FastReader sc = new FastReader();
        int n=sc.nextInt();
        int sx=sc.nextInt();
        int sy=sc.nextInt();
        int count1=0,count2=0,c1=0,c2=0;
        for(int i=0;i<n;i++){
            int a=sc.nextInt();
            int b=sc.nextInt();
            if(a>sx){
                count1++;
            }
            else if(a<sx){
                c1++;
            }
            if(b>sy){
                count2++;
            }
            else if(b<sy){
                c2++;
            }
        }
        int[] arr=new int[]{count1,count2,c2,c1};
        Arrays.sort(arr);
        if(arr[3]==count1){
            System.out.println(count1);
            System.out.println(sx+1+" "+sy);
        }
        else if(arr[3]==count2){
            System.out.println(count2);
            System.out.println(sx+" "+(sy+1));
        }
        else if(arr[3]==c1){
            System.out.println(c1);
            System.out.println(sx-1+" "+(sy));
        }
        else{
            System.out.println(c2);
            System.out.println(sx+" "+(sy-1));
        }

        }
    }
