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 com.company;
import java.io.*;
import java.util.*;
import java.lang.*;
public class Main{
    public static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        public FastReader(InputStream stream) {
            this.stream = stream;
        }
        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public String nextLine() {
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt() {
            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 long nextLong() {
            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 double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c))
                {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        public char nextChar() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            return (char)c;
        }
        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 boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    public static void main(String args[]){
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter w = new PrintWriter(outputStream);
        int n,i,j,c=0,first=0,second=0,third=0,fourth=0,xp,xn,yp,yn;
        long sx,sy;
        n=in.nextInt();
        sx=in.nextLong();
        sy=in.nextLong();
        int x[]=new int[n];
        int y[]=new int[n];
        for(i=0;i<n;i++){
            x[i]=in.nextInt();
            y[i]=in.nextInt();
            c=bound(x[i],y[i],sx,sy);
            if(c==1){
                first++;
            }
            if(c==2){
                second++;
            }
            if(c==3){
                third++;
            }
            if(c==4){
                fourth++;
            }
        }
        xp=first+fourth;
        xn=second+third;
        yp=first+second;
        yn=third+fourth;
        int max1,max2,max;
        max1=Math.max(xp,xn);
        max2=Math.max(yp,yn);
        max=Math.max(max1,max2);
        if(max==xp&&sx+1<=1000000000){
            w.println(xp);
            w.print((sx+1)+" "+sy);
            w.close();
            return;
        }
        if(max==yp&&sy+1<=1000000000){
            w.println(yp);
            w.print(sx+" "+(sy+1));
            w.close();
            return;
        }
        if(max==xn&&sx-1>=0){
            w.println(xn);
            w.print((sx-1)+" "+sy);
            w.close();
            return;
        }
        if(max==yn&&sy-1>=0){
            w.println(yn);
            w.print(sx+" "+(sy-1));
            w.close();
            return;
        }
        w.close();
    }
    static int bound(int x,int y,long sx,long sy){
        if(x>=sx&&y>=sy){
            return 1;
        }
        if(x>=sx&&y<=sy){
            return 4;
        }
        if(x<=sx&&y>=sy){
            return 2;
        }
        if(x<=sx&&y<=sy){
            return 3;
        }
        return 0;
    }
}