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

public class C {
    public static class Point {
        int x, y;
        public Point (int x, int y) {
            this.x = x;
            this.y = y;
        }
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int xS = sc.nextInt();
        int yS = sc.nextInt();
        List<Point> points = new ArrayList<>();
        for(int i=0; i<n; i++) {
            points.add(new Point(sc.nextInt(), sc.nextInt()));
        }
        int UP = 0;
        int LEFT = 0;
        int RIGHT = 0;
        int DOWN = 0;
        for(int i = 0; i<n; i++) {
            if(points.get(i).x > xS) DOWN++;
            if(points.get(i).x < xS) UP++;
            if(points.get(i).y < yS) LEFT++;
            if(points.get(i).y > yS) RIGHT++;
        }
        int max = Math.max(Math.max(LEFT,RIGHT),Math.max(DOWN,UP));
        if(RIGHT == max) {
            System.out.println(RIGHT);
            System.out.println(xS + " " + (yS+1));
            return;
        }
        if(LEFT == max) {
            System.out.println(LEFT);
            System.out.println(xS + " " + (yS-1));
            return;
        }
        if(UP == max) {
            System.out.println(UP);
            System.out.println((xS-1) + " " + (yS));
            return;
        }
        if(DOWN == max) {
            System.out.println(DOWN);
            System.out.println((xS+1) + " " + (yS));
            return;
        }


    }
}
