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 MyClass {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int x=sc.nextInt();
        int y=sc.nextInt();
        int arr[][]=new int[n][2];
        int a=0;
        int b=0;
        int c=0;
        int d=0;
        int e=0;
        int f=0;
        int g=0;
        int h=0;
        for(int i=0;i<n;i++)
          {
              arr[i][0]=sc.nextInt();
              arr[i][1]=sc.nextInt();
              if(arr[i][0]>x&&arr[i][1]>y)
                a++;
              else if(arr[i][0]==x&&arr[i][1]>y)
               b++;
              else if(arr[i][0]<x&&arr[i][1]>y)
               c++;
               else if(arr[i][0]<x&&arr[i][1]==y)
               d++;
               else if(arr[i][0]<x&&arr[i][1]<y)
                e++;
                else if(arr[i][0]==x&&arr[i][1]<y)
                 f++;
                 else if(arr[i][0]>x&&arr[i][1]<y)
                  g++;
                  else 
                    h++;
          }
          int a1=a+b+c;
          int b1=c+d+e;
          int c1=e+f+g;
          int d1=g+h+a;
          int m=Math.max(a1,Math.max(b1,Math.max(c1,d1)));
          System.out.println(m);
          if(m==d1)
           System.out.println(x+1+" "+y);
          else if(m==a1)
           System.out.println(x+" "+y+1);
          else if(m==b1)
           System.out.println(x-1+" "+y);
           else
           System.out.println(x+" "+(y-1));
          
    }
}