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.*;
import java.util.*;

public class C
{
	static void solve(FastIO io)
	{
		int n = io.nextInt();
		int sx = io.nextInt();
		int sy = io.nextInt();

		int[] x = new int[n];
		int[] y = new int[n];

		for (int i = 0; i < n; i++)
		{
			x[i] = io.nextInt();
			y[i] = io.nextInt();
		}
	
		int[] paths = new int[4];
		// north south east west

		for (int i = 0; i < n; i++)
		{
			int dx = sx - x[i];
			int dy = sy - y[i];

			if (dx > 0)
				paths[2]++;
			if (dx < 0)
				paths[3]++;

			if (dy > 0)
				paths[1]++;
			if (dy < 0)
				paths[0]++;
		}

		int[] DX = {0, 0, -1, 1};
		int[] DY = {1, -1, 0, 0};

		int max = 0;

		for (int i = 0; i < 4; i++)
			max = Math.max(max, paths[i]);

		for (int i = 0; i < 4; i++)
			if (paths[i] == max)
			{
				io.println(max);
				io.println((sx + DX[i]) + " " + (sy + DY[i]));
				return;
			}
	}

	public static void main(String[] args) {
		FastIO io = new FastIO();

		// int t = io.nextInt();
		
		// for (int i = 0; i < t; i++)
			solve(io);

		io.close();
	}
}

class FastIO extends PrintWriter
{
	BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st = new StringTokenizer("");

	FastIO()
	{
		super(System.out);
	}

	public String next()
	{
		while (!st.hasMoreTokens())
		{
			try {
				st = new StringTokenizer(r.readLine());
			} catch (Exception e) {
				//TODO: handle exception
			}
		}
		return st.nextToken();
	}

	public int nextInt()
	{
		return Integer.parseInt(next());
	}

	public long nextLong()
	{
		return Long.parseLong(next());
	}

	public double nextDouble()
	{
		return Double.parseDouble(next());
	}
}
