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

//When I wrote this code, only God & I understood what it did. Now only God knows !!


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


public class Main {

    static class FastReader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public FastReader() { this(System.in); }public FastReader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;}
        public String next(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();}
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;}
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;}
        public double d() throws IOException {return Double.parseDouble(next()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
        public void scanIntArr(int [] arr){ for(int li=0;li<arr.length;++li){ arr[li]=i();}}
        public void scanLongArr(long [] arr){for (int i=0;i<arr.length;++i){arr[i]=l();}}
        public void shuffle(int [] arr){ for(int i=arr.length;i>0;--i) { int r=(int)(Math.random()*i); int temp=arr[i-1]; arr[i-1]=arr[r]; arr[r]=temp; } }
    }

    public static void main(String[] args) throws IOException {

        FastReader fr = new FastReader();
        PrintWriter pw = new PrintWriter(System.out);
        /*
inputCopy
4 3 2
1 3
4 2
5 1
4 1
outputCopy
3
4 2
inputCopy
3 100 100
0 0
0 0
100 200
outputCopy
2
99 100
inputCopy
7 10 12
5 6
20 23
15 4
16 5
4 54
12 1
4 15
outputCopy
4
10 11
        */
        int t=1;
        for(int ti=0;ti<t;++ti)
        {
            int n=fr.i();
            int sx=fr.i();
            int sy=fr.i();
            Point [] points=new Point[4];
            points[0]=new Point(sx-1,sy,0);
            points[1]=new Point(sx,sy+1,0);
            points[2]=new Point(sx+1,sy,0);
            points[3]=new Point(sx,sy-1,0);
            for(int ni=0;ni<n;++ni)
            {
                int x=fr.i()-sx;
                int y=fr.i()-sy;
                if(x<0)
                {
                    ++points[0].weight;
                }
                else if(x>0)
                {
                    ++points[2].weight;
                }
                if(y<0)
                {
                    ++points[3].weight;
                }
                else if(y>0)
                {
                    ++points[1].weight;
                }
            }
            Arrays.sort(points);
            pw.println(points[3].weight);
            pw.println(points[3].sx+" "+points[3].sy);
        }
        pw.flush();
        pw.close();
    }
    static class Point implements Comparable<Point>
    {
        int weight,sx,sy;

        public Point(int sx,int sy,int weight) {
            this.weight = weight;
            this.sx = sx;
            this.sy = sy;
        }

        @Override
        public int compareTo(Point point) {
            return Integer.compare(this.weight,point.weight);
        }
    }
}
