The map of the capital of Berland can be viewed on the infinite coordinate plane. Each point with integer coordinates contains a building, and there are streets connecting every building to four neighbouring buildings. All streets are parallel to the coordinate axes.

The main school of the capital is located in (s_x, s_y). There are n students attending this school, the i-th of them lives in the house located in (x_i, y_i). It is possible that some students live in the same house, but no student lives in (s_x, s_y).

After classes end, each student walks from the school to his house along one of the shortest paths. So the distance the i-th student goes from the school to his house is |s_x - x_i| + |s_y - y_i|.

The Provision Department of Berland has decided to open a shawarma tent somewhere in the capital (at some point with integer coordinates). It is considered that the i-th student will buy a shawarma if at least one of the shortest paths from the school to the i-th student's house goes through the point where the shawarma tent is located. It is forbidden to place the shawarma tent at the point where the school is located, but the coordinates of the shawarma tent may coincide with the coordinates of the house of some student (or even multiple students).

You want to find the maximum possible number of students buying shawarma and the optimal location for the tent itself.

Input

The first line contains three integers n, s_x, s_y (1 ≤ n ≤ 200 000, 0 ≤ s_x, s_y ≤ 10^{9}) — the number of students and the coordinates of the school, respectively.

Then n lines follow. The i-th of them contains two integers x_i, y_i (0 ≤ x_i, y_i ≤ 10^{9}) — the location of the house where the i-th student lives. Some locations of houses may coincide, but no student lives in the same location where the school is situated.

Output

The output should consist of two lines. The first of them should contain one integer c — the maximum number of students that will buy shawarmas at the tent. 

The second line should contain two integers p_x and p_y — the coordinates where the tent should be located. If there are multiple answers, print any of them. Note that each of p_x and p_y should be not less than 0 and not greater than 10^{9}.

Examples

Input


4 3 2
1 3
4 2
5 1
4 1


Output


3
4 2


Input


3 100 100
0 0
0 0
100 200


Output


2
99 100


Input


7 10 12
5 6
20 23
15 4
16 5
4 54
12 1
4 15


Output


4
10 11

Note

In the first example, If we build the shawarma tent in (4, 2), then the students living in (4, 2), (4, 1) and (5, 1) will visit it.

In the second example, it is possible to build the shawarma tent in (1, 1), then both students living in (0, 0) will visit it.
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();
            }
        }
 
    }