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

/*
 * 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 xylenox
 */
public class c {
    static int MOD = 1000000007;
    public static void main(String[] args) {
        FS in = new FS(System.in);
        int n = in.nextInt();
        int sx = in.nextInt();
        int sy = in.nextInt();
        int[] numQ = new int[4];
        for(int i = 0; i < n; i++) {
            int x = in.nextInt()-sx;
            int y = in.nextInt()-sy;
            if(x > 0) numQ[0]++;
            else numQ[2]++;
            if(y > 0) numQ[1]++;
            else numQ[3]++;
        }
        int dir = 0;
        int max = 0;
        for(int i = 0; i < 4; i++) {
            if(numQ[i]> max) {
                max = numQ[i];
                dir = i;
            }
        }
        int nx = sx;
        int ny = sy;
        if(dir == 0) nx++;
        else if(dir == 1) ny++;
        else if(dir == 2) nx--;
        else ny--;
        System.out.println(max);
        System.out.println(nx + " " + ny);
    }
    
    static class FS {
        BufferedReader in;
        StringTokenizer token;
        
        public FS(InputStream st) {
            in = new BufferedReader(new InputStreamReader(st));
        }
        
        public String next() {
            if(token == null || !token.hasMoreElements()) {
                try {
                    token = new StringTokenizer(in.readLine());
                } catch(Exception e) {}
                return next();
            }
            return token.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}
