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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;

public class Shwarma {

	public static void main(String[] args)throws IOException {
		
		BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
		String s[]=ob.readLine().split(" ");
		int n=Integer.parseInt(s[0]);
		int sx=Integer.parseInt(s[1]);
		int sy=Integer.parseInt(s[2]);
		int up=0;
		int down=0;
		int left=0;
		int right=0;
		for(int i=0;i<n;i++)
		{
			String s1[]=ob.readLine().split(" ");
			int x=Integer.parseInt(s1[0]);
			int y=Integer.parseInt(s1[1]);
			if(x>sx)
				right++;
			if(x<sx)
				left++;
			if(y>sy)
				up++;
			if(y<sy)
				down++;
		}
		if(right>=left && right>=up && right>=down)
		{
			System.out.println(right);
			System.out.println((sx+1)+" "+sy);
			return;
			
		}
		if(left>=right && left>=up && left>=down)
		{
			System.out.println(left);
			System.out.println((sx-1)+" "+sy);
			return;
			
		}
		if(up>=right && up>=left && up>=down)
		{
			System.out.println(up);
			System.out.println(sx+" "+(sy+1));
			return;
			
		}
		if(down>=right && down>=left && down>=up)
		{
			System.out.println(down);
			System.out.println(sx+" "+(sy-1));
			return;
			
		}
	}

}
