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.util.function.Function;
import java.util.stream.Collectors;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;
import java.io.*;
import java.math.*;

public class CC
{
    static class point implements Comparable<point>
    {
        long x,y;
        point(long x,long y)
        {
            this.x=x;
        this.y=y;
        }
        public int compareTo(point o)
        {
            return (int)(x-o.x);
        }

    }
    public static void main(String[] args)
    {

        StringBuffer sb = new StringBuffer();
        int n=i();
        long Sx=l();
        long Sy=l();
        long X[]=new long[n];
        long Y[]=new long[n];
        for(int i=0;i<n;i++)
        {
            X[i]=l();
            Y[i]=l();

        }




        point A[]=new point[n];
        for(int i=0;i<n;i++) {
            A[i] = new point(X[i], Y[i]);
        }
        int q1=0;
        int q2=0;
        int q3=0;
        int q4=0;
        long c2=Sx+Sy;
        long c1=Sx-Sy;

        for(int i=0;i<n;i++)
        {
            if(A[i].x-A[i].y>=c1 && A[i].x+A[i].y<=c2)
            {
                q4++;
            }
            if(A[i].x-A[i].y<=c1 && A[i].x+A[i].y<=c2)
            {
                q3++;
            }
            if(A[i].x-A[i].y>=c1 && A[i].x+A[i].y>=c2)
            {
                q1++;
            }
            if(A[i].x-A[i].y<=c1 && A[i].x+A[i].y>=c2)
            {
                q2++;
            }
        }

        long ans=0;
        long px=0;
        long py=0;
        if(q1>=q2 && q1>=q3 && q1>=q4)
        {
            ans=q1;
            px=Sx+1;
            py=Sy;
        }
        else if(q2>=q1 && q2>=q3 && q2>=q4)
        {
            ans=q2;
            px=Sx;
            py=Sy+1;
        }
       else if(q3>=q1 && q3>=q2 && q3>=q4)
        {
            ans=q3;
            px=Sx-1;
            py=Sy;
        }
        else if(q4>=q1 && q4>=q2 && q4>=q3)
        {
            ans=q4;
            px=Sx;
            py=Sy-1;
        }







      sb.append(ans+"\n"+px+" "+py+"\n");







        System.out.println(sb.toString());
    }

///******************************SYSTEM PART*****************************************************************************************************************************************************************************************************************************************************////
    static InputReader in=new InputReader(System.in);
    static OutputWriter out=new OutputWriter(System.out);

    public static long pow(long a, long b){
        long result=1;
        while(b>0){
            if (b % 2 != 0){
                result=(result*a);
                b--;
            }
            a=(a*a);
            b /= 2;
        }
        return result;
    }
    public static long gcd(long a, long b){
        if (a == 0){
            return b;
        }
        return gcd(b%a, a);
    }
    public static long lcm(long a, long b){
        return a*(b/gcd(a,b));
    }
    public static long l(){
        String s=in.String();
        return Long.parseLong(s);
    }
    public static void pln(String value){
        System.out.println(value);
    }
    public static int i(){
        return in.Int();
    }
    public static String s(){
        return in.String();
    }
}
///******************input Reader//***************************************************************************************************************************************************************************************
class InputReader
{
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;
    public InputReader(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 int Int() {
        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 String String() {
        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 String next() {
        return String();
    }
    public interface SpaceCharFilter
    {
        public boolean isSpaceChar(int ch);
    }
}

//*******************OUTPUT WRITER********************************************************************************************************************************************************************************************************************************************************//
class OutputWriter {
    private final PrintWriter writer;
    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }
    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }
    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }
    public void printLine(Object...objects) {
        print(objects);
        writer.println();
    }
    public void close() {
        writer.close();
    }
    public void flush() {
        writer.flush();
    }
}







