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.*;
public class R608C2 {

	public static void main(String[] args) {
		JS scan = new JS();
		int n = scan.nextInt();
		int sx = scan.nextInt();
		int sy = scan.nextInt();
		int[] x=  new int[n];
		int[] y=  new int[n];
		int[] ans = new int[4];
		for(int i =0;i<n;i++) {
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
			if(x[i]<sx) {
				ans[0]++;//left
			}
			if(x[i]>sx)ans[1]++;
			if(y[i]<sy)ans[2]++;
			if(y[i]>sy)ans[3]++;
		}
		int max=0;
		int idx = 0;
		for(int i =0 ;i<4;i++) {
			if(ans[i]>max) {
				idx = i;
				max = ans[i];
			}
		}
		System.out.println(ans[idx]);
		if(idx==0) {
			System.out.println(sx-1+" "+(sy));
		}else if(idx==1) {
			System.out.println(sx+1+" "+(sy));
		}
		else if(idx==2) {
			System.out.println(sx+" "+(sy-1));
		}else {
			System.out.println(sx+" "+(sy+1));
		}
		
	}
	static class point implements Comparable<point>{
		int val, stud;
		public point(int a, int b) {
			val = a;
			stud = b;
		}
		@Override
		public int compareTo(point o) {
			return val-o.val;
		}
		
	}
	static class JS{
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public JS() {
			in = new BufferedInputStream(System.in, BS);
		}

		public JS(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}				
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
	}

}
