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
def fastio():
	import sys
	from io import StringIO 
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
string=''
a,*x=map(int,input().split())
up=0
down=0
left=0
right=0
for i in range(a):
    m,n=map(int,input().split())
    if m<x[0] and n!=x[1]:
        if n>x[1]:
            left+=1
            up+=1
        elif n<x[1]:
            down+=1
            left+=1
    elif m>x[0] and n!=x[1]:
        if n<x[1]:
            right+=1
            down+=1
        elif n>x[1]:
            up+=1
            right+=1
    else:
        if m==x[0] or n==x[1]:
            if m==x[0] and n==x[1]:
                pass
            elif m==x[0] and n!=x[1]:
                if n<x[1]:
                    down+=1
                else:
                    up+=1
            elif m!=x[0] and n==x[1]:
                if m<x[0]:
                    left+=1
                else:
                    right+=1
ans=[up,down,left,right]
aaa=max(ans)
string+=str(aaa)+'\n'
if ans[0]==aaa:
    string+=str(x[0])+' '+str(x[1]+1)+'\n'
elif ans[1]==aaa:
    string+=str(x[0])+' '+str(x[1]-1)+'\n'
elif ans[2]==aaa:
    string+=str(x[0]-1)+' '+str(x[1])+'\n'
elif ans[3]==aaa:
    string+=str(x[0]+1)+' '+str(x[1])+'\n'
    
print(string)
    
            
        