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

public class shawarmaTent {
    static BufferedReader b = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter p = new PrintWriter(System.out);

    public static void main(String arg[]) throws IOException {
        StringTokenizer st = new StringTokenizer(b.readLine());
        int k = Integer.parseInt(st.nextToken());
        int x = Integer.parseInt(st.nextToken());
        int y = Integer.parseInt(st.nextToken());
        int e = 0;
        int w = 0;
        int n = 0;
        int s = 0;
        while(k > 0){
            k--;
            st = new StringTokenizer(b.readLine());
            int g = Integer.parseInt(st.nextToken());
            int h = Integer.parseInt(st.nextToken());
            if(h > y){
                s++;
            } else if(h < y){
                n++;
            }
            if(g > x){
                e++;
            } else if(g < x){
                w++;
            }
        }
        if(e >= s && e >= w && e >= n){
            p.println(e);
            p.println((x + 1) + " " + y);
        } else if(s >= w && s >= n){
            p.println(s);
            p.println(x + " " + (y + 1));
        } else if(w >= n){
            p.println(w);
            p.println((x - 1) + " " + y);
        } else {
            p.println(n);
            p.println(x + " " + (y - 1));
        }
        p.close();
    }
}
