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

public class TestClass {
    public static void main(String args[] ) throws Exception {
    Scanner s=new Scanner(System.in);
    int n=s.nextInt();
    int sx=s.nextInt();
    int sy=s.nextInt();
    int x[]=new int[n];
    int y[]=new int[n];
    for(int i=0; i<n; i++)
    {
        x[i]=s.nextInt();
        y[i]=s.nextInt();
    }
    int c1,c2,c3,c4;
    c1=c2=c3=c4=0;
    
    for(int i=0; i<n; i++)
    {
        if(y[i]<sy)
        {
            c1++;
        }
        if(y[i]>sy)
        {
            c2++;
        }
        if(x[i]<sx)
        {
            c3++;
        }
        if(x[i]>sx)
        {
            c4++;
        }
    }
    int a=0;int b=0;
    int ans=Math.max(Math.max(c1,c2),Math.max(c3,c4));
    System.out.println(ans);
    if(ans==c1)
    {
        b=sy-1;
        a=sx;
        System.out.println(a+" "+b);
    }
    else if(ans==c2)
    {
        a=sx;
        b=sy+1;
        System.out.println(a+" "+b);
    }
    else if(ans==c3)
    {
        a=sx-1;
        b=sy;
        System.out.println(a+" "+b);
    }
    else
    {
        a=sx+1;
        b=sy;
        System.out.println(a+" "+b);
    }
    }
}
