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.math.BigInteger;
import java.util.StringTokenizer;

public class c608 {
    static PrintWriter out;
    static BufferedReader in;
    static StringTokenizer st;

    public static void main(String[] args) throws FileNotFoundException {
        //out = new PrintWriter("test.out");
        //in = new BufferedReader(new FileReader("test.in"));
        out = new PrintWriter(System.out);
        in = new BufferedReader(new InputStreamReader(System.in));
        new c608().Run();
        out.close();
    }

    String ns() {
        try {
            if (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(in.readLine());
            }
            return st.nextToken();
        } catch (Exception e) {
            return null;
        }
    }

    int nextint() {
        return Integer.valueOf(ns());
    }

    long nextlong() {
        return Long.valueOf(ns());
    }

    int N, xDef, yDef;
    int n ,e, w, s;
    public void Run() {
        N = nextint();
        xDef = nextint();
        yDef = nextint();

        n = 0;
        s = 0;
        w = 0;
        e = 0;
        int total;
        int rearX;
        int rearY;

        for (int i = 0; i < N; i++){
            int x = nextint();
            int y = nextint();
            if(x < xDef){
                w++;
            }
            else if (x > xDef){
                e++;
            }
            if (y < yDef){
                s++;
            }
            else if (y > yDef){
                n++;
            }
        }
        int xmax = Math.max(w,e);
        int ymax = Math.max(s,n);
        total = Math.max(xmax,ymax);
        out.println(total);
        rearX = 0;
        rearY = 0;

        if (n >= e && n >= w && n >= s){
            rearX = xDef;
            rearY = yDef + 1;
        }
        else if (s >= e && s >= n && s >= w){
            rearX = xDef;
            rearY = yDef - 1;
        }
        else if (e >= n && e >= w && e >= s){
            rearX = xDef + 1;
            rearY = yDef;
        }
        else if (w >= n && w >= s && w >= e){
            rearX = xDef - 1;
            rearY = yDef;
        }

        out.println(rearX + " " + rearY);
    }
}
