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.util.*;
import java.lang.*;
public class Codechef {
    static long mod = 1000000007;
    PrintWriter out;
    StringTokenizer st;
    BufferedReader br;
 	
 	class Pair 
	{
	    int f;
	    int s;
 
	    public Pair(int t, int r) {
	       f = t;
	       s = r;
	    }
 	}
 
	String ns() {
        while (st == null || !st.hasMoreElements()) {
 
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }
 
    String nextLine() throws Exception {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            throw new Exception(e.toString());
        }
        return str;
    }
 
    int nextInt() {
        return Integer.parseInt(ns());
    }
 
    long nextLong() {
        return Long.parseLong(ns());
    }
 
    double nextDouble() {
        return Double.parseDouble(ns());
    }
	
	
	public static void main(String args[]) throws IOException {
		new Codechef().run();
	}
 
	void run() throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        long s = System.currentTimeMillis();
		solve();
		out.flush();
		out.close();
	}

	long power(long x,long y)
	{
		long ans=1;
		while(y!=0)
		{
			if(y%2==1)
				ans*=x;
			x=x*x;
			y/=2;
		}
		return ans;
	}

	void solve()
	{				
		int n =nextInt();
		int x =nextInt();	
		int y =nextInt();
		int a[][]=new int[n][2];
		int n1=0,n2=0,n3=0,n4=0;	
		
		for(int i=0;i<n;i++)
		{
			int xi=nextInt();
			int yi=nextInt();
			if(xi<x)
				n1++;//x-1,y
			if(xi>x)
				n2++;//x+1,y
			if(yi<y)
				n3++;
			if(yi>y)
				n4++;

		}
		if(n1>=n2&&n1>=n3&&n1>=n4)
		{
			out.println(n1);
			out.println((x-1)+" "+y);
		}

		else if(n2>=n3&&n2>=n4)
		{
			out.println(n2);
			out.println((x+1)+" "+y);
		}
		else if(n3>=n4)
		{
			out.println(n3);
			out.println(x+" "+(y-1));
		}

		else
		{
			out.println(n4);
			out.println(x+" "+(y+1));
		}

					
			
	}
}