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 C_ShawarmaTent {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int sx = Integer.parseInt(st.nextToken());
		int sy = Integer.parseInt(st.nextToken());
		int r = 0;
		int l = 0;
		int u = 0;
		int d = 0;
		
		int xi = 0;
		int yi = 0;
		for(int i = 0; i < n ; i++) {
			st = new StringTokenizer(br.readLine());
			xi = Integer.parseInt(st.nextToken());
			yi = Integer.parseInt(st.nextToken());
			
			if(xi < sx) l++;
			else if(xi > sx) r++;
			
			if(yi < sy) d++;
			else if(yi > sy) u++;
		}
		int max = Math.max(l, r);
		max = Math.max(max, u);
		max = Math.max(max, d);
		
		if(max == l) sx--;
		else if(max == r) sx++;
		else if(max == u) sy++;
		else sy--;
		
		System.out.println(max);
		System.out.println(sx +" " + sy);
	}
}
