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 {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		StringTokenizer st = new StringTokenizer(in.readLine());
		int N = Integer.parseInt(st.nextToken());
		int sx = Integer.parseInt(st.nextToken());
		int sy = Integer.parseInt(st.nextToken());
		int numAbove = 0;
		int numBelow = 0;
		int numLeft = 0;
		int numRight = 0;
		for(int i = 0; i < N; ++i) {
			st = new StringTokenizer(in.readLine());
			int x = Integer.parseInt(st.nextToken());
			int y = Integer.parseInt(st.nextToken());
			if(y > sy) {
				numAbove++;
			} else if(y < sy) {
				numBelow++;
			}
			if(x > sx) {
				numRight++;
			} else if(x < sx) {
				numLeft++;
			}
		}
		if(numAbove >= numBelow && numAbove >= numLeft && numAbove >= numRight) {
			out.println(numAbove);
			out.println(sx + " " + (sy + 1));
		} else if(numBelow >= numLeft && numBelow >= numRight) {
			out.println(numBelow);
			out.println(sx + " " + (sy - 1));
		} else if(numLeft >= numRight) {
			out.println(numLeft);
			out.println((sx - 1) + " " + sy);
		} else {
			out.println(numRight);
			out.println((sx + 1) + " " + sy);
		}
		out.close();
		in.close();
	}
}
