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
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
*/
import java.util.*;
import java.io.*;

   public class x1271C
   {
      public static void main(String omkar[]) throws Exception
      {
         //BufferedReader infile = new BufferedReader(new FileReader("cowdate.in"));
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int sx = Integer.parseInt(st.nextToken());
         int sy = Integer.parseInt(st.nextToken());
         int[] arrX = new int[N];
         int[] arrY = new int[N];
         for(int i=0; i < N; i++)
         {
            st = new StringTokenizer(infile.readLine());
            arrX[i] = Integer.parseInt(st.nextToken());
            arrY[i] = Integer.parseInt(st.nextToken());
         }
         int res = 0;
         String rest = "";
         if(sx > 0)
         {
            int temp = 0;
            for(int i=0; i < N; i++)
               if(manhattan(sx,sy,arrX[i],arrY[i]) == 1+manhattan(sx-1, sy,arrX[i],arrY[i]))
                  temp++;
            if(res < temp)
            {
               res = temp;
               rest = (sx-1)+" "+sy;
            }
         }
         if(sy > 0)
         {
            int temp = 0;
            for(int i=0; i < N; i++)
               if(manhattan(sx,sy,arrX[i],arrY[i]) == 1+manhattan(sx, sy-1,arrX[i],arrY[i]))
                  temp++;
            if(res < temp)
            {
               res = temp;
               rest = (sx)+" "+(sy-1);
            }
         }
         if(sy < 1000000000)
         {
            int temp = 0;
            for(int i=0; i < N; i++)
               if(manhattan(sx,sy,arrX[i],arrY[i]) == 1+manhattan(sx, sy+1,arrX[i],arrY[i]))
                  temp++;
            if(res < temp)
            {
               res = temp;
               rest = (sx)+" "+(sy+1);
            }
         }
         if(sx < 1000000000)
         {
            int temp = 0;
            for(int i=0; i < N; i++)
               if(manhattan(sx,sy,arrX[i],arrY[i]) == 1+manhattan(sx+1, sy,arrX[i],arrY[i]))
                  temp++;
            if(res < temp)
            {
               res = temp;
               rest = (sx+1)+" "+(sy);
            }
         }
         System.out.println(res);
         System.out.println(rest);
      }
      public static int manhattan(int a, int b, int x, int y)
      {
         return Math.abs(a-x)+Math.abs(b-y);
      }
   }