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
// practice with kaiboy
import java.io.*;
import java.util.*;

public class CF1271C extends PrintWriter {
	CF1271C() { super(System.out); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		CF1271C o = new CF1271C(); o.main(); o.flush();
	}

	static final int INF = 1000000000;
	boolean inside(int x, int l, int r) {
		return l <= x && x <= r || r <= x && x <= l;
	}
	void main() {
		int n = sc.nextInt();
		int sx = sc.nextInt();
		int sy = sc.nextInt();
		int[] xx = new int[n];
		int[] yy = new int[n];
		for (int i = 0; i < n; i++) {
			xx[i] = sc.nextInt();
			yy[i] = sc.nextInt();
		}
		int x_ = -1, y_ = -1, k_ = -1;
		for (int x = sx - 1; x <= sx + 1; x++)
			for (int y = sy - 1; y <= sy + 1; y++) {
				if (x < 0 || x > INF || y < 0 || y > INF || x == sx && y == sy)
					continue;
				int k = 0;
				for (int i = 0; i < n; i++)
					if (inside(x, sx, xx[i]) && inside(y, sy, yy[i]))
						k++;
				if (k_ < k) {
					k_ = k; x_ = x; y_ = y;
				}
			}
		println(k_);
		println(x_ + " " + y_);
	}
}
