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.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();
        int sx = in.nextInt();
        int sy = in.nextInt();
        pt[] u = new pt[n];
        for (int i = 0; i < n; i++) {
            u[i] = new pt(in.nextInt(),in.nextInt());
        }
        sort(u,new ycmp());
        int klvmin = 0;
        int klvmax = 0;
        for (int i = 0; i < n; i++) {
            if(u[i].y == sy)continue;
            if(u[i].y < sy){
                klvmin++;
            }else{
                klvmax++;
            }
        }
        pt answer = null;
        int ans = 0;
        if(klvmin >= klvmax)answer = new pt(sx,sy - 1);
        else answer = new pt(sx,sy + 1);
        ans = max(klvmin,klvmax);
        sort(u,new xcmp());
        klvmin = 0;
       klvmax = 0;
        for (int i = 0; i < n; i++) {
            if(u[i].x == sx)continue;
            if(u[i].x < sx){
                klvmin++;
            }else{
                klvmax++;
            }
        }
        if(max(klvmin,klvmax) >= ans) {
            ans = max(klvmax,klvmin);
            if (klvmin >= klvmax) answer = new pt(sx - 1, sy);
            else answer = new pt(sx + 1, sy);
        }
        out.println(ans);
        out.print(answer.x + " " + answer.y);
        out.close();
    }
}

class pt {
    int x, y;

    public pt(int x, int y) {
        this.x = x;
        this.y = y;
    }
}
class xcmp implements Comparator<pt>{

    @Override
    public int compare(pt pt, pt t1) {
        return Integer.compare(pt.x,t1.x);
    }
}
class ycmp implements Comparator<pt>{

    @Override
    public int compare(pt pt, pt t1) {
        return Integer.compare(pt.y,t1.y);
    }
}
class FastScanner {
    BufferedReader br;
    StringTokenizer st;

    FastScanner(File f) throws FileNotFoundException {
        br = new BufferedReader(new FileReader(f));
    }

    FastScanner(InputStream is) {
        br = new BufferedReader(new InputStreamReader(is));
    }

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

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

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