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.util.StringTokenizer;

public class shwarma {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n =Integer.parseInt(st.nextToken()), sx = Integer.parseInt(st.nextToken()), sy = Integer.parseInt(st.nextToken());
        int[][] ar = new int[n][2];
        for (int i = 0; i < n; i++) {
            st = new StringTokenizer(br.readLine());
            ar[i][0] = Integer.parseInt(st.nextToken());
            ar[i][1] = Integer.parseInt(st.nextToken());
        }
        int[] dx = {-1, 1, 0, 0};
        int[] dy = {0, 0, -1, 1};
        int ans = 0;
        int bestx = 0, besty = 0;
        for (int i = 0; i < dx.length; i++) {
            int prevans = ans;
            int newx = sx + dx[i];
            int newy = sy + dy[i];
            int count = 0;
            if(i == 1) {
                for (int j = 0; j < n; j++) {
                    if (ar[j][0] >= newx){
                        count++;
                    }
                }
                ans = Math.max(ans, count);
            }else if(i == 0){
                for (int j = 0; j < n; j++) {
                    if (ar[j][0] <= newx){
                        count++;
                    }
                }
                ans = Math.max(ans, count);
            }else if(i == 3){
                for (int j = 0; j < n; j++) {
                    if (ar[j][1] >= newy){
                        count++;
                    }
                }
                ans = Math.max(ans, count);
            }else{
                for (int j = 0; j < n; j++) {
                    if (ar[j][1] <= newy){
                        count++;
                    }
                }
                ans = Math.max(ans, count);
            }
            if(ans != prevans){
                bestx = newx;
                besty = newy;
            }
        }
        System.out.println(ans);
        System.out.println(bestx + " " + besty);
    }
}
