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.awt.*;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class cp15 {

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];

        private int curChar;

        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new RuntimeException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String readString() {
            final StringBuilder stringBuilder = new StringBuilder();
            int c = read();
            while (isSpaceChar(c))
                c = read();
            do {
                stringBuilder.append((char)c);
                c = read();
            } while (!isSpaceChar(c));

            return stringBuilder.toString();
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
    }

    public static void main(String[] args)
    {
        InputReader inp=new InputReader(System.in);

        int n=inp.readInt();

        int s_x=inp.readInt(),s_y=inp.readInt();

        int cnt[]=new int[4];

        int x,y;
        for(int i=0;i<n;i++)
        {
            x=inp.readInt();
            y=inp.readInt();

            if(x>s_x)
            {
                cnt[0]++;
            }
            else if(x<s_x)
            {
                cnt[1]++;
            }

            if(y>s_y)
            {
                cnt[2]++;
            }
            else if(y<s_y)
            {
                cnt[3]++;
            }
        }

        int ma=0;
        int ans_x=0,ans_y=0;

        for(int i=0;i<4;i++)
        {
            if(cnt[i]>ma)
            {
                ma=cnt[i];

                ans_x=s_x;
                ans_y=s_y;

                if(i==0)
                {
                    ans_x++;
                }
                else if(i==1)
                {
                    ans_x--;
                }
                else if(i==2)
                {
                    ans_y++;
                }
                else
                {
                    ans_y--;
                }
            }
        }

        System.out.println(ma);
        System.out.printf("%d %d",ans_x,ans_y);
    }
}
