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.*;
import java.lang.reflect.Array;
import java.util.*;

import static java.lang.Math.*;

public class Main {

    void run() throws IOException {
        int n = nextInt();
        int sx = nextInt();
        int sy = nextInt();
        int[][] a = new int[n][2];
        for (int i = 0; i < a.length; i++) {
            for (int j = 0; j < 2; j++) {
                a[i][j] = nextInt();
            }
        }
        int best = 0;
        int best_pos_x = 17;
        int best_pos_y = 57;
        int cnt = 0;
        for (int i = 0; i < a.length; i++) {
            if (a[i][0] >= sx + 1) cnt++;
        }
        if (cnt > best) {
            best = cnt;
            best_pos_x = sx + 1;
            best_pos_y = sy;
        }
        cnt = 0;
        for (int i = 0; i < a.length; i++) {
            if (a[i][0] <= sx - 1) cnt++;
        }
        if (cnt > best) {
            best = cnt;
            best_pos_x = sx - 1;
            best_pos_y = sy;
        }
        cnt = 0;
        for (int i = 0; i < a.length; i++) {
            if (a[i][1] >= sy + 1) cnt++;
        }
        if (cnt > best) {
            best = cnt;
            best_pos_x = sx;
            best_pos_y = sy + 1;
        }
        cnt = 0;
        for (int i = 0; i < a.length; i++) {
            if (a[i][1] <= sy - 1) cnt++;
        }
        if (cnt > best) {
            best = cnt;
            best_pos_x = sx;
            best_pos_y = sy - 1;
        }
        pw.println(best);
        pw.print(best_pos_x + " " + best_pos_y);
        pw.close();
    }

    class point implements Comparable<point> {
        int x, y;

        public point(int a, int b) {
            x = a;
            y = b;
        }

        @Override
        public int compareTo(point o) {
            if (o.y == this.y) return Integer.compare(o.x, this.x);
            return -Integer.compare(o.y, this.y);
        }

    }

    long mod = (long) 1e9 + 7;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    //BufferedReader br = new BufferedReader(new FileReader("qual.in"));

    StringTokenizer st = new StringTokenizer("");
    PrintWriter pw = new PrintWriter(System.out);
    //PrintWriter pw = new PrintWriter("qual.out");

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

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

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

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

    public Main() throws FileNotFoundException {
    }

    public static void main(String[] args) throws IOException {
        new Main().run();
    }
}