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 FastReader f = new FastReader();

    public static void main(String[] args) {
        int n = f.nextInt();
        long sx = f.nextInt(), sy = f.nextInt();

        long o1 = 0, o2 = 0, o3 = 0, o4 = 0;
        long l1 = 0, l2 = 0, l3 = 0, l4 = 0;

        while (n-- > 0) {
            long x = f.nextInt();
            long y = f.nextInt();

            if(x < sx) {
                //1,3,5
                if(y == sy) {
                    l1++;
                } else if(y > sy) {
                    o1++;
                } else {
                    o3++;
                }
            } else if(x > sx) {
                //2,7,4
                if(y == sy) {
                    l3++;
                } else if(y > sy) {
                    o2++;
                } else {
                    o4++;
                }
            } else {
                //6,8
                if(y > sy) {
                    l2++;
                } else {
                    l4++;
                }
            }
        }

        long first = o1+o3+l1, second = o1+o2+l2, third = o2+o4+l3, fourth = o3+o4+l4;

        if(first >= second && first >= third && first >= fourth) {
            System.out.println(first);
            System.out.println((sx-1)+" "+(sy));
        } else if(second >= first && second >= third && second >= fourth) {
            System.out.println(second);
            System.out.println((sx)+" "+(sy+1));
        } else if(third >= first && third >= second && third >= fourth) {
            System.out.println(third);
            System.out.println((sx+1)+" "+(sy));
        } else {
            System.out.println(fourth);
            System.out.println((sx)+" "+(sy-1));
        }
    }


    //fast input reader
    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;
        }
    }
}
