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.util.*; 
public class C_608{
public static void main(String[] args)
{
   Scanner omkar = new Scanner(System.in);
   int n = omkar.nextInt();
   int s_x = omkar.nextInt();
   int s_y = omkar.nextInt();
   int pos_x = 0;
   int pos_y = 0;
   int neg_x = 0;
   int neg_y = 0;
   int temp;
   for(int i = 0; i < n; i++)
   {
      temp = omkar.nextInt();
      if(temp > s_x)
      {
         pos_x++;
      }
      if(temp < s_x)
      {
         neg_x++;
      }
      temp = omkar.nextInt();
      if(temp > s_y)
      {
         pos_y++;
      }
      if(temp < s_y)
      {
         neg_y++;
      }
   }
   int max = Math.max(Math.max(pos_x, pos_y), Math.max(neg_x, neg_y));
   if(max == neg_y)
   {
      System.out.println(""+max);
      System.out.println(s_x + " " + (s_y-1));
      return;
   }
   if(max == pos_x)
   {
      System.out.println(""+max);
      System.out.println((s_x+1) + " " + s_y);
      return;
   }
   if(max == pos_y)
   {
      System.out.println(""+max);
      System.out.println(s_x + " " + (s_y+1));
      return;
   }
   if(max == neg_x)
   {
      System.out.println(""+max);
      System.out.println((s_x-1) + " " + s_y);
      return;
   }
   
  }
 

}