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.util.*;
import java.io.*;

 public class problem2 {
	
	public static class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;

		public InputReader(InputStream st) {
			this.stream = st;
		}

		public int read() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public String readString() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}

	
	public static long factorialNumInverse[];
	public static long naturalNumInverse[];
	public static long fact[];
	public static int N = 100007;
	
	public static char change(char a) {
		if(a == 'W')return 'B';
		else return 'W';
	}
	public static void InverseofNumber(long p) {
		naturalNumInverse = new long [N+1];
		naturalNumInverse[0] = 1;
		naturalNumInverse[1] = 1;
		for(int i = 2;i<=N;i++) {
			naturalNumInverse[i] = naturalNumInverse[(int)(p % i)] * (p - p / i) % p;
		}
	}
	
	public static void InverseofFactorial(long p) {
		factorialNumInverse = new long [N+1];
		factorialNumInverse[0] = 1;
		factorialNumInverse[1] = 1;
		for(int i = 2;i<=N;i++) {
			factorialNumInverse[i] = (naturalNumInverse[i] * factorialNumInverse[i - 1]) % p;
		}
	}
	
	public static void factorial(long p) {
		fact = new long [N+1];
		fact[0] = 1;
		for(int i = 1;i<=N;i++) {
			fact[i] = (fact[i - 1] * i) % p; 
		}
	}
	
	public static long Binomial(long N, long R, long p) {
		long ans = ((fact[(int)N] * factorialNumInverse[(int)R]) 
	              % p * factorialNumInverse[(int)(N - R)]) 
	             % p;
				
		return ans;
		
	}
        public static void main(String[] args) throws IOException {
            Scanner sc = new Scanner(System.in);
            PrintWriter pw = new PrintWriter(System.out);
            int n = sc.nextInt();
            int sx=sc.nextInt();
            int sy=sc.nextInt();
            int[][]a=new int[n][2];
            for (int i =0;i<n;i++){
                a[i][0]=sc.nextInt();
                a[i][1]=sc.nextInt();
            }
            int []dx={1,0,0,-1};
            int[] dy={0,1,-1,0};
            int ans=0;
            int ddx=-1;
            int ddy=-1;
            for (int k =0;k<4;k++){
                int nx=sx+dx[k];
                int ny=sy+dy[k];
                int c=0;
                if (nx<0||nx>1e9||ny<0||ny>1e9)continue;
                for (int i =0;i<n;i++){
                    int d =Math.abs(a[i][0]-nx)+Math.abs(a[i][1]-ny)+1;
                    if (d==Math.abs(a[i][0]-sx)+Math.abs(a[i][1]-sy)){
                        c++;
                    }
                }
                if (c>ans){
                    ans=c;
                    ddx=nx;
                    ddy=ny;
                }
            }
            pw.println(ans);
            pw.println(ddx+" "+ddy);
            pw.flush();
        }
        static class Edge{
            int v,c;
            Edge(int a,int b){
                v=a;c=b;
            }
        }
        static class UnionFind {
            int[] p, rank, setSize;
            int numSets;
            HashSet<Integer>[]ele;
            public UnionFind(int N)
            {
                ele=new HashSet[N];
                p = new int[numSets = N];
                rank = new int[N];
                setSize = new int[N];
                for (int i = 0; i < N; i++) {
                    ele[i]=new HashSet<>();
                    p[i] = i; setSize[i] = 1;
                    ele[i].add(i);
                }
            }
 
            public int findSet(int i) { return p[i] == i ? i : (p[i] = findSet(p[i])); }
 
            public boolean isSameSet(int i, int j) { return findSet(i) == findSet(j); }
 
            public void unionSet(int i, int j)
            {
                if (isSameSet(i, j))
                    return;
                numSets--;
                int x = findSet(i), y = findSet(j);
                if(rank[x] > rank[y]) {
                    for (int zz:ele[y])ele[x].add(zz);
                    p[y] = x; setSize[x] += setSize[y]; }
                else
                {	for (int zz:ele[x])ele[y].add(zz);
                    p[x] = y; setSize[y] += setSize[x];
                    if(rank[x] == rank[y]) rank[y]++;
                }
            }
 
            public int numDisjointSets() { return numSets; }
 
            public int sizeOfSet(int i) { return setSize[findSet(i)]; }
        }
        static long gcd(long a, long b) {
            if (a == 0) return b;
            return gcd(b % a, a);
        }
 
        static class Scanner {
            StringTokenizer st;
            BufferedReader br;
 
            public Scanner(FileReader r) {
                br = new BufferedReader(r);
            }
 
            public Scanner(InputStream s) {
                br = new BufferedReader(new InputStreamReader(s));
            }
 
            public String next() throws IOException {
                while (st == null || !st.hasMoreTokens())
                    st = new StringTokenizer(br.readLine());
                return st.nextToken();
            }
 
            public int nextInt() throws IOException {
                return Integer.parseInt(next());
            }
 
            public long nextLong() throws IOException {
                return Long.parseLong(next());
            }
 
            public String nextLine() throws IOException {
                return br.readLine();
            }
 
            public double nextDouble() throws IOException {
                String x = next();
                StringBuilder sb = new StringBuilder("0");
                double res = 0, f = 1;
                boolean dec = false, neg = false;
                int start = 0;
                if (x.charAt(0) == '-') {
                    neg = true;
                    start++;
                }
                for (int i = start; i < x.length(); i++)
                    if (x.charAt(i) == '.') {
                        res = Long.parseLong(sb.toString());
                        sb = new StringBuilder("0");
                        dec = true;
                    } else {
                        sb.append(x.charAt(i));
                        if (dec)
                            f *= 10;
                    }
                res += Long.parseLong(sb.toString()) / f;
                return res * (neg ? -1 : 1);
            }
 
            public boolean ready() throws IOException {
                return br.ready();
            }
        }
 
    }