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 _1271c {
    FastScanner scn;
    PrintWriter w;
    PrintStream fs;

    long MOD = 1000000007;
    int N=100000+10;
    long mul(long x, long y) {long res = x * y; return (res >= MOD ? res % MOD : res);}
    long power(long x, long y) {if (y < 0) return 1; long res = 1; x %= MOD; while (y!=0) {if ((y & 1)==1)res = mul(res, x); y >>= 1; x = mul(x, x);} return res;}
    boolean LOCAL;
    void debug(Object... o){if(LOCAL)System.err.println(Arrays.deepToString(o));}
    
    void solve(){

        int n=scn.nextInt();
        long sx=scn.nextLong(),sy=scn.nextLong();
        long ax=0,ay=0,a=0,bx=0,by=0,b=0,cx=0,cy=0,c=0,dx=0,dy=0,d=0;
        while(n-->0)
        {
            long x=scn.nextLong(),y=scn.nextLong();
            if(x>=sx&&y>=sy)
            {
                if(y==sy) ax++;
                else if(x==sx) ay++;
                else a++;
            }
            if(x<=sx&&y>=sy)
            {
                if(y==sy) bx++;
                else if(x==sx) by++;
                else b++;
            }
            if(x<=sx&&y<=sy)
            {
                if(y==sy) cx++;
                else if(x==sx) cy++;
                else c++;
            }
            if(x>=sx&&y<=sy)
            {
                if(y==sy) dx++;
                else if(x==sx) dy++;
                else d++;
            }
        }

        long suma=ax+ay+a,sumb=bx+by+b,sumc=cx+cy+c,sumd=dx+dy+d;
        
        if(suma>=sumb&&suma>=sumc&&suma>=sumd)
        {
            w.println("a");
            if(ay+c>=ax+d)
            {
                w.println(suma+c);
                w.println(sx+" "+(sy+1));
            }else{
                w.println(suma+d);
                w.println((sx+1)+" "+sy);
            }
        }else if(sumb>=suma&&sumb>=sumc&&sumb>=sumd)
        {
            w.println("b");
            if(by+a>=bx+c)
            {
                w.println(sumb+a);
                w.println(sx+" "+(sy+1));
            }else{
                w.println(sumb+c);
                w.println((sx-1)+" "+sy);
            }
        }else if(sumc>=suma&&sumc>=sumb&&sumc>=sumd)
        {
            w.println("c");
            if(cy+d>=cx+b)
            {
                w.println(sumc+d);
                w.println(sx+" "+(sy-1));
            }else{
                w.println(sumc+b);
                w.println((sx-1)+" "+sy);
            }
        }else if(sumd>=suma&&sumd>=sumb&&sumd>=sumc)
        {
            w.println("d");
            if(dy+c>=dx+a)
            {
                w.println(sumd+c);
                w.println(sx+" "+(sy-1));
            }else{
                w.println(sumd+a);
                w.println((sx+1)+" "+sy);
            }
        }

    }
 
    void run() {
        try {
            long ct = System.currentTimeMillis();
            scn = new FastScanner(new File("input.txt"));
            w = new PrintWriter(new File("output.txt"));
            fs=new PrintStream("error.txt");
            System.setErr(fs);
            LOCAL=true;
 
            solve();
 
            w.close();
            System.err.println(System.currentTimeMillis() - ct);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
 
    void runIO() {
 
        scn = new FastScanner(System.in);
        w = new PrintWriter(System.out);
        LOCAL=false;
 
        solve();
 
        w.close();
    }
 
    class FastScanner {
        BufferedReader br;
        StringTokenizer st;
 
        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }
 
        public FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }
 
        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }
 
        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
        
        int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        long[] nextLongArray(int n) {
            long a[] = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextLong();
            }
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
    }
 
    public static void main(String[] args) {
        new _1271c().runIO();
    }
}

