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.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class C1271 {

    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer tokenizer = new StringTokenizer(reader.readLine());
        int N = Integer.parseInt(tokenizer.nextToken());
        int SX = Integer.parseInt(tokenizer.nextToken());
        int SY = Integer.parseInt(tokenizer.nextToken());
        int U = 0;
        int D = 0;
        int L = 0;
        int R = 0;
        for (int n=0; n<N; n++) {
            tokenizer = new StringTokenizer(reader.readLine());
            int x = Integer.parseInt(tokenizer.nextToken());
            int y = Integer.parseInt(tokenizer.nextToken());
            if (x > SX) {
                R++;
            } else if (x < SX) {
                L++;
            }
            if (y > SY) {
                U++;
            } else if (y < SY) {
                D++;
            }
        }
        int count = 0;
        int tx = 0;
        int ty = 0;
        if (R >= L && R >= U && R >= D) {
            count = R;
            tx = SX+1;
            ty = SY;
        } else if (L >= R && L >= U && L >= D) {
            count = L;
            tx = SX-1;
            ty = SY;
        } else if (U >= D) {
            count = U;
            tx = SX;
            ty = SY+1;
        } else {
            count = D;
            tx = SX;
            ty = SY-1;
        }
        System.out.println(count);
        System.out.println(tx + " " + ty);
    }

}
