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

public class C {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        long sx = scanner.nextLong();
        long sy = scanner.nextLong();
        ArrayList<Integer> nesw = new ArrayList<>();
        nesw.add(0);
        nesw.add(0);
        nesw.add(0);
        nesw.add(0);

        for (int i = 0; i < n; i++) {
            long xi = scanner.nextLong();
            if (xi < sx)
                nesw.set(3, nesw.get(3)+1);
            else if (xi > sx)
                nesw.set(1, nesw.get(1)+1);

            long yi = scanner.nextLong();
            if (yi < sy)
                nesw.set(2, nesw.get(2)+1);
            else if (yi > sy)
                nesw.set(0, nesw.get(0)+1);
        }
        int numStudents = Collections.max(nesw);
        int dir = nesw.indexOf(numStudents);
        System.out.println(numStudents);
        switch (dir) {
            case 0:
                System.out.println(sx + " " + (sy+1));
                break;
            case 1:
                System.out.println((sx+1) + " " + sy);
                break;
            case 2:
                System.out.println(sx + " " + (sy-1));
                break;
            case 3:
                System.out.println((sx-1) + " " + sy);
                break;
        }

    }
}
