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.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        FastReader fr = new FastReader();
        FastWriter fw = new FastWriter();
        int n = fr.nextInt();
        int sX = fr.nextInt();
        int sY = fr.nextInt();

        int x[] = new int[n];
        int y[] = new int[n];

        for (int i = 0; i < n; i++) {
            x[i] = fr.nextInt();
            y[i] = fr.nextInt();
        }

        int candidX[] = {sX - 1, sX, sX, sX + 1};
        int candidY[] = {sY, sY - 1, sY + 1, sY};

        int count[] = new int[4];
        int max = 0;
        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < n; j++) {
                if (ifOnPath(x[j], y[j], sX, sY, candidX[i], candidY[i])) {
                    count[i]++;
                }
            }
            max = Math.max(max, count[i]);
        }

        int i = 0;
        while (i < 4 && count[i] != max) i++;

        fw.println(max);
        fw.print(candidX[i] + " " + candidY[i]);
        fw.flush();
    }

    static boolean ifOnPath(int sourceX, int sourceY, int destX, int destY, int valX, int valY) {
        if (destX < sourceX) {
            int temp = destX;
            destX = sourceX;
            sourceX = temp;
        }
        if (destY < sourceY) {
            int temp = destY;
            destY = sourceY;
            sourceY = temp;
        }
        return valX >= sourceX && valX <= destX && valY >= sourceY && valY <= destY;
    }

}


class FastReader {
    public FastReader() {
    }

    public FastReader(String fileName) throws FileNotFoundException {
        this.br = new BufferedReader(new FileReader(fileName));
    }

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st;

    String nextString() throws IOException {
        if (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextString());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextString());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextString());
    }
}

class FastWriter {
    public FastWriter() {
    }

    public FastWriter(String fileName) throws IOException {
        this.bw = new BufferedWriter(new FileWriter(fileName));
    }

    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

    void print(Object o) throws IOException {
        bw.write(o.toString());
//        bw.flush();
    }

    void println(Object o) throws IOException {
        print(o.toString() + "\n");
    }

    void printSp(Object o) throws IOException {
        print(o.toString() + " ");
    }

    void flush() throws IOException {
        bw.flush();
    }
}