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 final class code
// class code
// public class Solution
{
	static void solve()throws IOException
	{
		int n=nextInt();
		int sx=nextInt();
		int sy=nextInt();
		int h0=0,h1=0,h2=0,h3=0;
		while(n-->0)
		{
			int x=nextInt();
			int y=nextInt();
			if(x>sx)
				h1++;
			if(x<sx)
				h3++;
			if(y>sy)
				h0++;
			if(y<sy)
				h2++;
					// debug(q1,q2,q3,q4);

		}
		// debug(h0,h1,h2,h3);
		Pair halves[]=new Pair[4];
		halves[0]=new Pair(h0,0);
		halves[1]=new Pair(h1,1);
		halves[2]=new Pair(h2,2);
		halves[3]=new Pair(h3,3);
		// debug(halves[0],halves[1],halves[2],halves[3]);
		Arrays.sort(halves);
		Pair h[]=new Pair[4];
		h[0]=new Pair(sx,sy+1);
		h[1]=new Pair(sx+1,sy);
		h[2]=new Pair(sx,sy-1);
		h[3]=new Pair(sx-1,sy);
		out.println(halves[3].first);
		out.println(h[halves[3].second].first+" "+h[halves[3].second].second);
	}
	///////////////////////////////////////////////////////////
	
	public static void main(String args[])throws IOException
	{
		br=new BufferedReader(new InputStreamReader(System.in));
		out=new PrintWriter(new BufferedOutputStream(System.out));
		random=new Random();
		solve();
 
		// int t=nextInt();
		// for(int i=1;i<=t;i++)
		// {
		// 	// out.print("Case #"+i+": ");
		// 	solve();
		// }
 
		out.close();
	}
	static final long mod=(long)(1e9+7);
	static final int inf=(int)(1e9+1);
	// static final long inf=(long)(1e18);
	static class Pair implements Comparable<Pair>
	{
		int first,second;
		Pair(int a,int b)
		{
			first=a;
			second=b;
		}
		public int compareTo(Pair p)
		{
			return this.first-p.first;
		}
		public boolean equals(Object p)
		{
			Pair p1=(Pair)p;
			return (first==p1.first && second==p1.second);
		}
		public String toString()
		{
			return this.first+" "+this.second;
		}
		public int hashCode()
		{
			return (int)((1l*(inf+1)*this.first+this.second)%mod);
		}
	}
	static int max(int ... a)
	{
		int ret=a[0];
		for(int i=1;i<a.length;i++)
			ret=Math.max(ret,a[i]);
		return ret;
	}
	static void debug(Object ... a)
	{
		System.out.print("> ");
		for(int i=0;i<a.length;i++)
			System.out.print(a[i]+" ");
		System.out.println();
	}
	static void debug(int a[]){debuga(Arrays.stream(a).boxed().toArray());}
	static void debug(long a[]){debuga(Arrays.stream(a).boxed().toArray());}
	static void debuga(Object a[])
	{
		System.out.print("> ");
		for(int i=0;i<a.length;i++)
			System.out.print(a[i]+" ");
		System.out.println();
	}
 
	
	static Random random;
	static BufferedReader br;
	static StringTokenizer st;
	static PrintWriter out;
	static String nextToken()throws IOException
	{
		while(st==null || !st.hasMoreTokens())
			st=new StringTokenizer(br.readLine());
		return st.nextToken();
	}
	static String nextLine()throws IOException
	{
		return br.readLine();
	}
	static int nextInt()throws IOException
	{
		return Integer.parseInt(nextToken());
	}
	static long nextLong()throws IOException
	{
		return Long.parseLong(nextToken());
	}
	static double nextDouble()throws IOException
	{
		return Double.parseDouble(nextToken());
	}
	
}