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
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author LUCIANO
 */
import java.util.*;

public class Solve {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();
        int l, u, r, b;
        l = u = r = b = 0;
        for (int i = 0; i < n; i++) {
            int sx = in.nextInt();
            int sy = in.nextInt();
            if (sx <= x - 1) {
                l += 1;
                if (sy >= y + 1) {
                    u += 1;
                }
                if (sy <= y - 1) {
                    b += 1;
                }
            } else if (sx >= x + 1) {
                r += 1;
                if (sy >= y + 1) {
                    u += 1;
                }
                if (sy <= y - 1) {
                    b += 1;
                }
            } else {
                if (sy >= y + 1) {
                    u += 1;
                }
                if (sy <= y - 1) {
                    b += 1;
                }
            }
        }
        int ans = Math.max(Math.max(l, Math.max(r, u)), b);
        System.out.println(ans);
        if (l == ans) {
            System.out.println((x - 1) + " " + y);
        } else if (r == ans) {
            System.out.println((x + 1) + " " + y);
        } else if (u == ans) {
            System.out.println(x + " " + (y + 1));
        } else {
            System.out.println(x + " " + (y - 1));
        }
    }
}
