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
/*package whatever //do not write package name here */

import java.io.*;
import java.util.*;

public final class GFG {
	public static void main (String[] args) {
	    Scanner in= new Scanner(System.in);
	    int n=in.nextInt();
	    int x=in.nextInt();
	    int y=in.nextInt();
	    int left=0,right=0,up=0,down=0;
	    int a,b;
	    for(int i=0;i<n;i++){
	        a=in.nextInt();
	        b=in.nextInt();
	        if(a<x){
	           left++; 
	        }
	        else{
	            right++;
	        }
	        
	        if(b<y){
	            down++;
	        }
	        else{
	            up++;
	        }
	    }
	    int highest=high(left,right,up,down);
	    if(highest==1){
	        System.out.println(left);
	        System.out.println((x-1)+" "+y);
	    }
	    else if(highest==2){
	        System.out.println(right);
	        System.out.println((x+1)+" "+y);
	    }
	    else if(highest==3){
	        System.out.println(up);
	        System.out.println((x)+" "+(y+1));
	    }
	    else if(highest==4){
	        System.out.println(down);
	        System.out.println((x)+" "+(y-1));
	    }
	}
	public static int high(int l ,int r, int u,int d){
	    int ans,ans1,ans2,m1,m2,m3;
	    if(l>r){
	        m1=l;
	        ans1=1;
	    }
	    else{
	        m1=r;
	        ans1=2;
	    }
	    if(u>d){
	        m2=u;
	        ans2=3;
	    }
	    else{
	        m2=d;
	        ans2=4;
	    }
	    if(m2>m1){
	        ans=ans2;
	    }
	    else{
	        ans=ans1;
	    }
	   //System.out.println(ans);
	    return ans;
	}
}














