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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader sc = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, sc, out);
        out.close();
    }

    static class Task {
        public void solve(int testNumber, InputReader sc, PrintWriter out) throws IOException {
        	int[] x=new int[2];   //0 up 1down
        	int[] y=new int[2]; 	//0 left 1 right
        	int[] cnt=new int[4];
        	int n=sc.nextInt();
        	int sx=sc.nextInt();
        	int sy=sc.nextInt();
        	for(int i=0;i<n;i++) {
        		int ax=sc.nextInt();
        		int ay=sc.nextInt();
        		if(ax==sx) {
        			if(ay>sy)
        				x[0]++;
        			else
        				x[1]++;
        			continue;
        		}
        		if(ay==sy) {
        			if(ax<sx)
        				y[0]++;
        			else
        				y[1]++;
        			continue;
        		}
        		if(ax<sx&&ay>sy)
        			cnt[0]++;
        		if(ax>sx&&ay>sy)
        			cnt[1]++;
        		if(ax>sx&&ay<sy)
        			cnt[2]++;
        		if(ax<sx&&ay<sy)
        			cnt[3]++;
        	}
        	ArrayList<Node> buf=new ArrayList<>();
        	buf.add(new Node(cnt[0]+cnt[1]+x[0],sx,sy+1));
        	buf.add(new Node(cnt[2]+cnt[3]+x[1],sx,sy-1));
        	buf.add(new Node(cnt[0]+cnt[3]+y[0],sx-1,sy));
        	buf.add(new Node(cnt[1]+cnt[2]+y[1],sx+1,sy));
        	Collections.sort(buf);
        	out.println(buf.get(0).val);
        	out.println(buf.get(0).x+" "+buf.get(0).y);
        }

    }
    
    static class Node implements Comparable<Node>{
    	int val;
    	int x;
    	int y;
    	
    	public Node(int val,int x,int y) {
    		this.val=val;
    		this.x=x;
    		this.y=y;
    	}

		@Override
		public int compareTo(Node o) {
			return o.val-this.val;
		}
    }

    static class InputReader{
        StreamTokenizer tokenizer;
        public InputReader(InputStream stream){
            tokenizer=new StreamTokenizer(new BufferedReader(new InputStreamReader(stream)));
            tokenizer.ordinaryChars(33,126);
            tokenizer.wordChars(33,126);
        }
        public String next() throws IOException {
            tokenizer.nextToken();
            return tokenizer.sval;
        }
        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }
        public boolean hasNext() throws IOException {
            int res=tokenizer.nextToken();
            tokenizer.pushBack();
            return res!=tokenizer.TT_EOF;
        }
        
        public double nextDouble() throws NumberFormatException, IOException {
        	return Double.parseDouble(next());
        }
        
        public BigInteger nextBigInteger() throws IOException {
        	return new BigInteger(next());
        }
    }
}
