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.ArrayList;
import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n =sc.nextInt();
        int Sx = sc.nextInt();
        int Sy = sc.nextInt();

        int left = 0,right =0 ,up =0,down = 0;

        for(int i=0;i<n;i++){
            int x = sc.nextInt();int y = sc.nextInt();
            int MinDist = Math.abs(x-Sx)+ Math.abs(y-Sy);

            int LMin = 1 + Math.abs(Sx-1-x)+Math.abs(y-Sy);
            int RMin = 1 + Math.abs(Sx+1-x)+Math.abs(y-Sy);
            int UMin = 1 + Math.abs(x-Sx)+Math.abs(Sy+1-y);
            int DMin = 1 + Math.abs(x-Sx)+Math.abs(Sy-1-y);

            if(LMin <= MinDist){
                left++;
            }

            if(RMin <= MinDist){
                right++;
            }

            if(UMin <= MinDist){
                up++;
            }

            if(DMin <= MinDist){
                down++;
            }
        }

        int Max = (Math.max(Math.max(left,right),Math.max(up,down)));
        System.out.println(Max);
        if(Max==left){
            System.out.println((Sx-1)+ " "+Sy);
        }else if(Max==right){
            System.out.println((Sx+1)+ " "+Sy);
        }else if(Max==up){
            System.out.println(Sx+ " "+(Sy+1));
        }else {
            System.out.println(Sx+ " "+(Sy-1));
        }
    }
}
