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.util.StringTokenizer;

public class CF1271C {
    public static void main(String[] args) {
        FastReader input = new FastReader();
        int n = input.nextInt();
        int sx = input.nextInt();
        int sy = input.nextInt();
        int up = 0;
        int down = 0;
        int same  = 0;
        for(int i = 0;i < n;i++){
            int x = input.nextInt();
            int y = input.nextInt();
            if(y == sy){
                same++;
            }
            else if(y > sy){
                up++;
            }
            else{
               down++;
            }
        }
        if(up >= down){
            System.out.println(up + same);
            System.out.println(sx + " " + (sy + 1));
        }
        else{
            System.out.println(down + same);
            System.out.println(sx + " " + (sy - 1));
        }
    }
    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;
        }
    }
}
